diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..cf1b0fc --- /dev/null +++ b/.travis.yml @@ -0,0 +1,13 @@ +dist: xenial +language: python +cache: pip +python: + - 2.7.13 + - 3.4 + - 3.5 + - 3.6 + - 3.7 +install: + - pip install tox-travis +script: + - tox diff --git a/setup.py b/setup.py index e5fe549..ca6f641 100644 --- a/setup.py +++ b/setup.py @@ -16,6 +16,12 @@ def read(fname): Intended Audience :: System Administrators License :: OSI Approved :: MIT License Programming Language :: Python +Programming Language :: Python :: 2.7 +Programming Language :: Python :: 3.4 +Programming Language :: Python :: 3.5 +Programming Language :: Python :: 3.6 +Programming Language :: Python :: 3.7 +Framework :: Django Topic :: Software Development :: Libraries :: Python Modules Operating System :: Microsoft :: Windows Operating System :: Unix @@ -27,6 +33,10 @@ def read(fname): needs_pytest = {'pytest', 'test', 'ptr'}.intersection(sys.argv) setup_requires = ['pytest-runner'] if needs_pytest else [] +extras = { + 'comments': ['django-contrib-comments'], +} + setup( name='django-compat-patcher', version=read("VERSION"), @@ -41,7 +51,8 @@ def read(fname): packages=packages, - install_requires=['django-contrib-comments'] + (["Django<2"] if (sys.version_info < (3,)) else []), + install_requires=(['Django<2'] if (sys.version_info < (3,)) else ['Django']), + extras_require=extras, setup_requires=setup_requires, tests_require=["pytest", "pytest-pythonpath", "django-compat"], diff --git a/tox.ini b/tox.ini index c433fd5..b7ad167 100644 --- a/tox.ini +++ b/tox.ini @@ -16,9 +16,12 @@ deps= django2_0: Django>=2,<2.1 django2_1: Django>=2.1,<2.2 django2_2: Django>=2.2,<3.0 + + django1_{8,9,10}: django-contrib-comments==1.7.0 + django1_11,django2_{0,1,2}: django-contrib-comments>=1.8.0 commands= - python {toxinidir}/setup.py test - python check_behaviour_with_minimal_settings.py + python {toxinidir}/setup.py test + python check_behaviour_with_minimal_settings.py #[testenv:doc] ## see http://tox.readthedocs.io/en/latest/example/general.html#integrating-sphinx-documentation-checks