aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2020-01-12 13:02:55 -0500
committerGitHub <noreply@github.com>2020-01-12 13:02:55 -0500
commit7bac1ed1f82199e968bd025d631d00a00f3f46b3 (patch)
tree35e675ca1f5488a1c39ce667f3790c45ceb424ba
parent335937785a05d68efa291b8710270584d15b8361 (diff)
parentcb2138e24bc9a91e533c4596c125afa6f3eb5c6c (diff)
downloadexternal_python_setuptools-7bac1ed1f82199e968bd025d631d00a00f3f46b3.tar.gz
external_python_setuptools-7bac1ed1f82199e968bd025d631d00a00f3f46b3.tar.bz2
external_python_setuptools-7bac1ed1f82199e968bd025d631d00a00f3f46b3.zip
Merge pull request #1961 from pypa/restore-python2-tests
Restore testing on Python 2, bypassing the requires-python check when installing Setuptools.
-rw-r--r--.travis.yml5
-rw-r--r--tools/tox_pip.py5
-rw-r--r--tox.ini4
3 files changed, 13 insertions, 1 deletions
diff --git a/.travis.yml b/.travis.yml
index d18b86c0..263386c8 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -4,6 +4,11 @@ language: python
jobs:
fast_finish: true
include:
+ - &latest_py2
+ python: 2.7
+ env: TOXENV=py27
+ - <<: *latest_py2
+ env: LANG=C TOXENV=py27
- 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()
diff --git a/tox.ini b/tox.ini
index a666f0af..d458dc33 100644
--- a/tox.ini
+++ b/tox.ini
@@ -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