Commit 7bac1ed1 authored by Jason R. Coombs's avatar Jason R. Coombs Committed by GitHub

Merge pull request #1961 from pypa/restore-python2-tests

Restore testing on Python 2, bypassing the requires-python check when installing Setuptools.
parents 33593778 cb2138e2
......@@ -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
......
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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment