From 94f88bf48af78c4f961fe42241da556837efa3c1 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 19 Jan 2020 11:54:02 -0500 Subject: Bootstrap the environment in tox, allowing simple 'tox' to run tests and simplifying all of the pipelines. --- tools/tox_pip.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'tools') 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) -- cgit v1.2.1