diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2020-01-19 11:54:02 -0500 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2020-01-19 11:54:02 -0500 |
commit | 94f88bf48af78c4f961fe42241da556837efa3c1 (patch) | |
tree | 44aceec9ff1e6ed1971ee0c1b12e4bbc6a332e60 /tools | |
parent | 7f6394863dc096b9f31e71a5843acbd836ff8d6c (diff) | |
download | external_python_setuptools-94f88bf48af78c4f961fe42241da556837efa3c1.tar.gz external_python_setuptools-94f88bf48af78c4f961fe42241da556837efa3c1.tar.bz2 external_python_setuptools-94f88bf48af78c4f961fe42241da556837efa3c1.zip |
Bootstrap the environment in tox, allowing simple 'tox' to run tests and simplifying all of the pipelines.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/tox_pip.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tools/tox_pip.py b/tools/tox_pip.py index 06655fe4..2d33e9e5 100644 --- a/tools/tox_pip.py +++ b/tools/tox_pip.py @@ -14,13 +14,20 @@ def remove_setuptools(): subprocess.check_call(cmd, cwd='.tox') +def bootstrap(): + print("Running bootstrap") + cmd = [sys.executable, '-m', 'bootstrap'] + subprocess.check_call(cmd) + + 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() + if '.' in args: + remove_setuptools() + bootstrap() cmd = [sys.executable, '-m', 'pip'] + args subprocess.check_call(cmd) |