aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2020-01-19 11:54:02 -0500
committerJason R. Coombs <jaraco@jaraco.com>2020-01-19 11:54:02 -0500
commit94f88bf48af78c4f961fe42241da556837efa3c1 (patch)
tree44aceec9ff1e6ed1971ee0c1b12e4bbc6a332e60
parent7f6394863dc096b9f31e71a5843acbd836ff8d6c (diff)
downloadexternal_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.
-rw-r--r--.github/workflows/python-tests.yml4
-rw-r--r--.travis.yml2
-rw-r--r--appveyor.yml1
-rw-r--r--docs/conf.py2
-rw-r--r--docs/developer-guide.txt8
-rw-r--r--tools/tox_pip.py11
-rw-r--r--tox.ini4
7 files changed, 13 insertions, 19 deletions
diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml
index 71957aba..a95a5b1d 100644
--- a/.github/workflows/python-tests.yml
+++ b/.github/workflows/python-tests.yml
@@ -52,10 +52,6 @@ jobs:
env
env: ${{ matrix.env }}
- - name: Update egg_info based on setup.py in checkout
- run: >-
- python -m bootstrap
- env: ${{ matrix.env }}
- name: Verify that there's no cached Python modules in sources
if: >-
! startsWith(matrix.os, 'windows-')
diff --git a/.travis.yml b/.travis.yml
index 263386c8..fe875ab6 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -40,8 +40,6 @@ install:
- pip freeze --all
- env
-# update egg_info based on setup.py in checkout
-- python bootstrap.py
- "! grep pyc setuptools.egg-info/SOURCES.txt"
script:
diff --git a/appveyor.yml b/appveyor.yml
index fc65a9a7..f7ab22f6 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -28,7 +28,6 @@ test_script:
- python -m pip install --disable-pip-version-check --upgrade pip setuptools wheel
- pip install --upgrade tox tox-venv virtualenv
- pip freeze --all
- - python bootstrap.py
- tox -- --cov
after_test:
diff --git a/docs/conf.py b/docs/conf.py
index cbd19fb4..6f6ae13a 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -26,7 +26,7 @@ import os
# hack to run the bootstrap script so that jaraco.packaging.sphinx
# can invoke setup.py
'READTHEDOCS' in os.environ and subprocess.check_call(
- [sys.executable, 'bootstrap.py'],
+ [sys.executable, '-m', 'bootstrap'],
cwd=os.path.join(os.path.dirname(__file__), os.path.pardir),
)
diff --git a/docs/developer-guide.txt b/docs/developer-guide.txt
index d145fba1..0b4ae4d4 100644
--- a/docs/developer-guide.txt
+++ b/docs/developer-guide.txt
@@ -104,12 +104,8 @@ from the command line after pushing a new branch.
Testing
-------
-The primary tests are run using tox. To run the tests, first create the metadata
-needed to run the tests::
-
- $ python bootstrap.py
-
-Then make sure you have tox installed, and invoke it::
+The primary tests are run using tox. Make sure you have tox installed,
+and invoke it::
$ tox
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)
diff --git a/tox.ini b/tox.ini
index d458dc33..e71067be 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,5 +1,3 @@
-# Note: Run "python bootstrap.py" before running Tox, to generate metadata.
-#
# To run Tox against all supported Python interpreters, you can set:
#
# export TOXENV='py27,py3{5,6,7,8},pypy,pypy3'
@@ -49,7 +47,7 @@ commands=codecov -X gcov --file {toxworkdir}/coverage.xml
deps = -r{toxinidir}/docs/requirements.txt
skip_install=True
commands =
- python {toxinidir}/bootstrap.py
+ python -m bootstrap
sphinx-build -W -b html -d {envtmpdir}/doctrees docs docs/build/html
sphinx-build -W -b man -d {envtmpdir}/doctrees docs docs/build/man