Skip to content

Commit

Permalink
Add Travis for Python 2.7 & 3.4-3.7
Browse files Browse the repository at this point in the history
Moves django-contrib-comments to be an extra, so is not mandatory.
Pre-install appropriate versions of django-contrib-comments in
tox.

Closes #2
  • Loading branch information
jayvdb committed May 9, 2019
1 parent 57b2d16 commit 51c02e4
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 3 deletions.
13 changes: 13 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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
13 changes: 12 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"),
Expand All @@ -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"],

Expand Down
7 changes: 5 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 51c02e4

Please sign in to comment.