|
@@ -10,115 +10,121 @@ import os
|
10
|
10
|
import re
|
11
|
11
|
import sys
|
12
|
12
|
|
13
|
|
-from setuptools import setup
|
|
13
|
+from setuptools import setup, find_packages
|
14
|
14
|
|
15
|
15
|
PROJECT_DIR = os.path.dirname(__file__)
|
16
|
16
|
|
17
|
|
-sys.path.append(os.path.join(PROJECT_DIR, 'src'))
|
|
17
|
+sys.path.append(os.path.join(PROJECT_DIR, "src"))
|
18
|
18
|
from oscar import get_version # noqa isort:skip
|
19
|
19
|
|
20
|
20
|
install_requires = [
|
21
|
|
- 'django>=3.2,<4.3',
|
|
21
|
+ "setuptools>=51.3.3",
|
|
22
|
+ "django>=3.2,<4.3",
|
22
|
23
|
# PIL is required for image fields, Pillow is the "friendly" PIL fork
|
23
|
|
- 'pillow>=6.0',
|
|
24
|
+ "pillow>=6.0",
|
24
|
25
|
# We use the ModelFormSetView from django-extra-views for the basket page
|
25
|
|
- 'django-extra-views>=0.13,<0.15',
|
|
26
|
+ "django-extra-views>=0.13,<0.15",
|
26
|
27
|
# Search support
|
27
|
|
- 'django-haystack>=3.0b1',
|
|
28
|
+ "django-haystack>=3.0b1",
|
28
|
29
|
# Treebeard is used for categories
|
29
|
|
- 'django-treebeard>=4.3.0',
|
|
30
|
+ "django-treebeard>=4.3.0",
|
30
|
31
|
# Babel is used for currency formatting
|
31
|
|
- 'Babel>=1.0,<3.0',
|
|
32
|
+ "Babel>=1.0,<3.0",
|
32
|
33
|
# For manipulating search URLs
|
33
|
|
- 'purl>=0.7',
|
|
34
|
+ "purl>=0.7",
|
34
|
35
|
# For phone number field
|
35
|
|
- 'phonenumbers',
|
36
|
|
- 'django-phonenumber-field>=4.0.0,<7.0.0',
|
|
36
|
+ "phonenumbers",
|
|
37
|
+ "django-phonenumber-field>=4.0.0,<7.0.0",
|
37
|
38
|
# Used for oscar.test.factories
|
38
|
|
- 'factory-boy>=3.0,<3.3',
|
|
39
|
+ "factory-boy>=3.0,<3.3",
|
39
|
40
|
# Used for automatically building larger HTML tables
|
40
|
|
- 'django-tables2>=2.3,<2.4',
|
|
41
|
+ "django-tables2>=2.3,<2.4",
|
41
|
42
|
# Used for manipulating form field attributes in templates (eg: add
|
42
|
43
|
# a css class)
|
43
|
|
- 'django-widget-tweaks>=1.4.1',
|
|
44
|
+ "django-widget-tweaks>=1.4.1",
|
44
|
45
|
]
|
45
|
46
|
|
46
|
|
-sorl_thumbnail_version = 'sorl-thumbnail>=12.9,<12.10'
|
47
|
|
-easy_thumbnails_version = 'easy-thumbnails>=2.7,<2.8.6'
|
|
47
|
+sorl_thumbnail_version = "sorl-thumbnail>=12.9,<12.10"
|
|
48
|
+easy_thumbnails_version = "easy-thumbnails>=2.7,<2.8.6"
|
48
|
49
|
|
49
|
50
|
docs_requires = [
|
50
|
|
- 'Sphinx>=5.0',
|
51
|
|
- 'sphinxcontrib-spelling==7.5.1',
|
52
|
|
- 'sphinx_rtd_theme==1.0.0',
|
53
|
|
- 'sphinx-issues==3.0.1',
|
|
51
|
+ "Sphinx>=5.0",
|
|
52
|
+ "sphinxcontrib-spelling==7.5.1",
|
|
53
|
+ "sphinx_rtd_theme==1.0.0",
|
|
54
|
+ "sphinx-issues==3.0.1",
|
54
|
55
|
sorl_thumbnail_version,
|
55
|
56
|
easy_thumbnails_version,
|
56
|
57
|
]
|
57
|
58
|
|
58
|
59
|
test_requires = [
|
59
|
|
- 'WebTest>=2.0,<2.1',
|
60
|
|
- 'coverage>=5.4,<5.5',
|
61
|
|
- 'django-webtest>=1.9,<1.10',
|
62
|
|
- 'psycopg2-binary>=2.8,<2.10',
|
63
|
|
- 'pytest-django>=3.7,<3.9',
|
64
|
|
- 'pytest-xdist>=2.2,<3',
|
65
|
|
- 'tox>=3.21,<4',
|
66
|
|
- 'freezegun>=1.1,<2',
|
67
|
|
- 'pytz',
|
|
60
|
+ "WebTest>=2.0,<2.1",
|
|
61
|
+ "coverage>=5.4,<5.5",
|
|
62
|
+ "django-webtest>=1.9,<1.10",
|
|
63
|
+ "psycopg2-binary>=2.8,<2.10",
|
|
64
|
+ "pytest-django>=3.7,<3.9",
|
|
65
|
+ "pytest-xdist>=2.2,<3",
|
|
66
|
+ "tox>=3.21,<4",
|
|
67
|
+ "freezegun>=1.1,<2",
|
|
68
|
+ "pytz",
|
|
69
|
+ "vdt.versionplugin.wheel",
|
68
|
70
|
sorl_thumbnail_version,
|
69
|
71
|
easy_thumbnails_version,
|
70
|
72
|
]
|
71
|
73
|
|
72
|
|
-with open(os.path.join(PROJECT_DIR, 'README.rst'), encoding="utf-8") as fh:
|
|
74
|
+with open(os.path.join(PROJECT_DIR, "README.rst"), encoding="utf-8") as fh:
|
73
|
75
|
long_description = re.sub(
|
74
|
|
- '^.. start-no-pypi.*^.. end-no-pypi', '', fh.read(), flags=re.M | re.S)
|
|
76
|
+ "^.. start-no-pypi.*^.. end-no-pypi", "", fh.read(), flags=re.M | re.S
|
|
77
|
+ )
|
75
|
78
|
|
76
|
79
|
setup(
|
77
|
|
- name='django-oscar',
|
|
80
|
+ name="django-oscar",
|
78
|
81
|
version=get_version(),
|
79
|
|
- url='https://github.com/django-oscar/django-oscar',
|
|
82
|
+ url="https://github.com/django-oscar/django-oscar",
|
80
|
83
|
author="David Winterbottom",
|
81
|
84
|
author_email="david.winterbottom@gmail.com",
|
82
|
85
|
description="A domain-driven e-commerce framework for Django",
|
83
|
86
|
long_description=long_description,
|
84
|
87
|
keywords="E-commerce, Django, domain-driven",
|
85
|
|
- license='BSD',
|
86
|
|
- platforms=['linux'],
|
|
88
|
+ license="BSD",
|
|
89
|
+ platforms=["linux"],
|
87
|
90
|
include_package_data=True,
|
88
|
|
- python_requires='>=3.8',
|
|
91
|
+ package_dir={'': 'src'},
|
|
92
|
+ packages=find_packages('src'),
|
|
93
|
+ python_requires=">=3.8",
|
89
|
94
|
install_requires=install_requires,
|
90
|
95
|
extras_require={
|
91
|
|
- 'docs': docs_requires,
|
92
|
|
- 'test': test_requires,
|
93
|
|
- 'sorl-thumbnail': [sorl_thumbnail_version],
|
94
|
|
- 'easy-thumbnails': [easy_thumbnails_version],
|
|
96
|
+ "docs": docs_requires,
|
|
97
|
+ "test": test_requires,
|
|
98
|
+ "sorl-thumbnail": [sorl_thumbnail_version],
|
|
99
|
+ "easy-thumbnails": [easy_thumbnails_version],
|
95
|
100
|
},
|
96
|
101
|
classifiers=[
|
97
|
|
- 'Development Status :: 5 - Production/Stable',
|
98
|
|
- 'Environment :: Web Environment',
|
99
|
|
- 'Framework :: Django',
|
100
|
|
- 'Framework :: Django :: 3.2',
|
101
|
|
- 'Framework :: Django :: 4.0',
|
102
|
|
- 'Framework :: Django :: 4.1',
|
103
|
|
- 'Framework :: Django :: 4.2',
|
104
|
|
- 'Intended Audience :: Developers',
|
105
|
|
- 'License :: OSI Approved :: BSD License',
|
106
|
|
- 'Operating System :: Unix',
|
107
|
|
- 'Programming Language :: Python',
|
108
|
|
- 'Programming Language :: Python :: 3',
|
109
|
|
- 'Programming Language :: Python :: 3.8',
|
110
|
|
- 'Programming Language :: Python :: 3.9',
|
111
|
|
- 'Programming Language :: Python :: 3.10',
|
112
|
|
- 'Programming Language :: Python :: 3.11',
|
113
|
|
- 'Topic :: Software Development :: Libraries :: Application Frameworks']
|
|
102
|
+ "Development Status :: 5 - Production/Stable",
|
|
103
|
+ "Environment :: Web Environment",
|
|
104
|
+ "Framework :: Django",
|
|
105
|
+ "Framework :: Django :: 3.2",
|
|
106
|
+ "Framework :: Django :: 4.0",
|
|
107
|
+ "Framework :: Django :: 4.1",
|
|
108
|
+ "Framework :: Django :: 4.2",
|
|
109
|
+ "Intended Audience :: Developers",
|
|
110
|
+ "License :: OSI Approved :: BSD License",
|
|
111
|
+ "Operating System :: Unix",
|
|
112
|
+ "Programming Language :: Python",
|
|
113
|
+ "Programming Language :: Python :: 3",
|
|
114
|
+ "Programming Language :: Python :: 3.8",
|
|
115
|
+ "Programming Language :: Python :: 3.9",
|
|
116
|
+ "Programming Language :: Python :: 3.10",
|
|
117
|
+ "Programming Language :: Python :: 3.11",
|
|
118
|
+ "Topic :: Software Development :: Libraries :: Application Frameworks",
|
|
119
|
+ ],
|
114
|
120
|
)
|
115
|
121
|
|
116
|
122
|
# Show contributing instructions if being installed in 'develop' mode
|
117
|
|
-if len(sys.argv) > 1 and sys.argv[1] == 'develop':
|
118
|
|
- docs_url = 'https://django-oscar.readthedocs.io/en/latest/internals/contributing/index.html'
|
119
|
|
- mailing_list = 'django-oscar@googlegroups.com'
|
120
|
|
- mailing_list_url = 'https://groups.google.com/forum/?fromgroups#!forum/django-oscar'
|
121
|
|
- twitter_url = 'https://twitter.com/django_oscar'
|
|
123
|
+if len(sys.argv) > 1 and sys.argv[1] == "develop":
|
|
124
|
+ docs_url = "https://django-oscar.readthedocs.io/en/latest/internals/contributing/index.html"
|
|
125
|
+ mailing_list = "django-oscar@googlegroups.com"
|
|
126
|
+ mailing_list_url = "https://groups.google.com/forum/?fromgroups#!forum/django-oscar"
|
|
127
|
+ twitter_url = "https://twitter.com/django_oscar"
|
122
|
128
|
msg = (
|
123
|
129
|
"You're installing Oscar in 'develop' mode so I presume you're thinking\n"
|
124
|
130
|
"of contributing:\n\n"
|
|
@@ -128,7 +134,7 @@ if len(sys.argv) > 1 and sys.argv[1] == 'develop':
|
128
|
134
|
"(c) There are more detailed contributing guidelines that you should "
|
129
|
135
|
"have a look at:\n %s\n"
|
130
|
136
|
"(d) Consider following @django_oscar on Twitter to stay up-to-date\n"
|
131
|
|
- " %s\n\nHappy hacking!") % (mailing_list, mailing_list_url,
|
132
|
|
- docs_url, twitter_url)
|
133
|
|
- line = '=' * 82
|
|
137
|
+ " %s\n\nHappy hacking!"
|
|
138
|
+ ) % (mailing_list, mailing_list_url, docs_url, twitter_url)
|
|
139
|
+ line = "=" * 82
|
134
|
140
|
print(("\n%s\n%s\n%s" % (line, msg, line)))
|