Skip to content

Commit

Permalink
Merge pull request #186 from dominno/fix-versions
Browse files Browse the repository at this point in the history
Fix pinning version of Django for library; cleanup setup.py
  • Loading branch information
Dmytro Litvinov authored Feb 14, 2020
2 parents 68f683a + 8b7843f commit 9bac8b8
Showing 1 changed file with 13 additions and 12 deletions.
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,
)

0 comments on commit 9bac8b8

Please sign in to comment.