diff options
| -rw-r--r-- | .travis.yml | 4 | ||||
| -rw-r--r-- | tools/tox_pip.py | 5 | ||||
| -rw-r--r-- | tox.ini | 4 |
3 files changed, 12 insertions, 1 deletions
diff --git a/.travis.yml b/.travis.yml index d18b86c0..24b2451b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,10 @@ language: python jobs: fast_finish: true include: + - &latest_py2 + python: 2.7 + - <<: *latest_py2 + env: LANG=C - python: pypy3 env: DISABLE_COVERAGE=1 # Don't run coverage on pypy (too slow). - python: 3.5 diff --git a/tools/tox_pip.py b/tools/tox_pip.py index f592e412..06655fe4 100644 --- a/tools/tox_pip.py +++ b/tools/tox_pip.py @@ -1,3 +1,4 @@ +import os import subprocess import sys @@ -14,6 +15,10 @@ def remove_setuptools(): def pip(args): + # Honor requires-python when installing test suite dependencies + if any('-r' in arg for arg in args): + os.environ['PIP_IGNORE_REQUIRES_PYTHON'] = '0' + # When installing '.', remove setuptools '.' in args and remove_setuptools() @@ -19,7 +19,9 @@ deps=-r{toxinidir}/tests/requirements.txt pip_version = pip install_command = {[helpers]pip} install {opts} {packages} list_dependencies_command = {[helpers]pip} freeze --all -setenv=COVERAGE_FILE={toxworkdir}/.coverage.{envname} +setenv = + COVERAGE_FILE={toxworkdir}/.coverage.{envname} + py27: PIP_IGNORE_REQUIRES_PYTHON=true # TODO: The passed environment variables came from copying other tox.ini files # These should probably be individually annotated to explain what needs them. passenv=APPDATA HOMEDRIVE HOMEPATH windir APPVEYOR APPVEYOR_* CI CODECOV_* TRAVIS TRAVIS_* NETWORK_REQUIRED |
