Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix pinning version of Django for library #186

Merged
merged 2 commits into from
Feb 14, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 13 additions & 12 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,25 @@
version = __import__('moderation').__version__

tests_require = [
'django>=1.11,<=2.2.9',
'unittest2py3k',
'django>=1.11,<2.3',
'django-webtest',
'webtest',
'mock',
'pillow',
]

# ipython>2 is only supported on Python 2.7+
if sys.hexversion < 0x02070000:
tests_require = ['ipython>=0.10,<2'] + tests_require
install_requires = [
'django>=1.11,<2.3',
'django-model-utils'
]

if sys.hexversion >= 0x03000000:
tests_require = ['unittest2py3k'] + tests_require
else:
tests_require = ['unittest2'] + tests_require
# override django-model-utils version in requirements file if DJANGO env is set
DJANGO_ENV = os.environ.get("DJANGO")
if DJANGO_ENV == 'Django>=1.11,<2.0':
install_requires = [
"django-model-utils<4" if r == "django-model-utils" else r for r in install_requires
]

setup(
name='django-moderation',
Expand Down Expand Up @@ -54,9 +58,6 @@
include_package_data=True,
tests_require=tests_require,
test_suite='runtests.runtests',
install_requires=[
'django>=1.11,<=2.2.9',
'django-model-utils',
],
install_requires=install_requires,
zip_safe=False,
)