diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0432f3d --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +/.tox +/*.egg-info +*.pyc diff --git a/README.rst b/README.rst index a730a70..1a266af 100644 --- a/README.rst +++ b/README.rst @@ -23,3 +23,11 @@ Possible Future Commands ------------------------ - Install with blacklisting support (wsgiref, distribute, setuptools). + +Development +----------- + +To run the tests: + +1. ``pip install -r requirements.txt`` +2. ``tox`` diff --git a/requirements.txt b/requirements.txt index 1d9dff8..68988ca 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,2 @@ docopt==0.6.2 +tox==2.3.1 diff --git a/setup.py b/setup.py index dc1a29a..a5659f9 100644 --- a/setup.py +++ b/setup.py @@ -19,6 +19,7 @@ setup( zip_safe=False, platforms='any', install_requires=['docopt', 'pip>=1.5.0'], + tests_require=['tox'], classifiers=[ # As from https://pypi.python.org/pypi?%3Aaction=list_classifiers #'Development Status :: 1 - Planning', diff --git a/tests/test-requirements.txt b/tests/test-requirements.txt new file mode 100644 index 0000000..62c51c8 --- /dev/null +++ b/tests/test-requirements.txt @@ -0,0 +1,3 @@ +cffi +django +requests[security] diff --git a/tests/test-requirements2.txt b/tests/test-requirements2.txt new file mode 100644 index 0000000..2873925 --- /dev/null +++ b/tests/test-requirements2.txt @@ -0,0 +1,3 @@ +Django==1.9.6 +gunicorn +requests[security] diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..25ba465 --- /dev/null +++ b/tox.ini @@ -0,0 +1,34 @@ +[tox] +# To reduce the size of the test matrix, tests the following pip versions: +# * all of the latest major version releases (8.x) +# * only the first and last point release of each older major version +# * plus the latest distro version available via LTS Ubuntu package managers: +# (1.5.4 for Trusty, 8.1.1 for Xenial). +envlist = pip{154,156,600,611,700,712,800,801,802,803,810,811,812} + +[testenv] +# Speeds up pip install and reduces log spam, for compatible versions of pip. +setenv = PIP_DISABLE_PIP_VERSION_CHECK=1 + +deps = + pip154: pip==1.5.4 + pip156: pip==1.5.6 + pip600: pip==6.0.0 + pip611: pip==6.1.1 + pip700: pip==7.0.0 + pip712: pip==7.1.2 + pip800: pip==8.0.0 + pip801: pip==8.0.1 + pip802: pip==8.0.2 + pip803: pip==8.0.3 + pip810: pip==8.1.0 + pip811: pip==8.1.1 + pip812: pip==8.1.2 + +# TODO: Replace with something like https://scripttest.readthedocs.io or else +# rework the pip-grep and pip-diff scripts so they can more easily be unit-tested. +commands = + pip-grep tests/test-requirements.txt cffi + pip-grep tests/test-requirements.txt requests + pip-diff --fresh tests/test-requirements.txt tests/test-requirements2.txt + pip-diff --stale tests/test-requirements.txt tests/test-requirements2.txt