Skip to content

Commit 0559f17

Browse files
committed
Bootstrap the environment in tox, allowing simple 'tox' to run tests and simplifying all of the pipelines.
1 parent 1314828 commit 0559f17

File tree

6 files changed

+13
-15
lines changed

6 files changed

+13
-15
lines changed

.travis.yml

-2
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ install:
4141
- pip freeze --all
4242
- env
4343

44-
# update egg_info based on setup.py in checkout
45-
- python bootstrap.py
4644
- "! grep pyc setuptools.egg-info/SOURCES.txt"
4745

4846
script:

appveyor.yml

-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ test_script:
2828
- python -m pip install --disable-pip-version-check --upgrade pip setuptools wheel
2929
- pip install --upgrade tox tox-venv virtualenv
3030
- pip freeze --all
31-
- python bootstrap.py
3231
- tox -- --cov
3332

3433
after_test:

docs/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
# hack to run the bootstrap script so that jaraco.packaging.sphinx
2727
# can invoke setup.py
2828
'READTHEDOCS' in os.environ and subprocess.check_call(
29-
[sys.executable, 'bootstrap.py'],
29+
[sys.executable, '-m', 'bootstrap'],
3030
cwd=os.path.join(os.path.dirname(__file__), os.path.pardir),
3131
)
3232

docs/developer-guide.txt

+2-6
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,8 @@ from the command line after pushing a new branch.
104104
Testing
105105
-------
106106

107-
The primary tests are run using tox. To run the tests, first create the metadata
108-
needed to run the tests::
109-
110-
$ python bootstrap.py
111-
112-
Then make sure you have tox installed, and invoke it::
107+
The primary tests are run using tox. Make sure you have tox installed,
108+
and invoke it::
113109

114110
$ tox
115111

tools/tox_pip.py

+9-2
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,16 @@ def remove_setuptools():
1313
subprocess.check_call(cmd, cwd='.tox')
1414

1515

16+
def bootstrap():
17+
print("Running bootstrap")
18+
cmd = [sys.executable, '-m', 'bootstrap']
19+
subprocess.check_call(cmd)
20+
21+
1622
def pip(args):
17-
# When installing '.', remove setuptools
18-
'.' in args and remove_setuptools()
23+
if '.' in args:
24+
remove_setuptools()
25+
bootstrap()
1926

2027
cmd = [sys.executable, '-m', 'pip'] + args
2128
subprocess.check_call(cmd)

tox.ini

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# Note: Run "python bootstrap.py" before running Tox, to generate metadata.
2-
#
31
# To run Tox against all supported Python interpreters, you can set:
42
#
53
# export TOXENV='py27,py3{5,6,7,8},pypy,pypy3'
@@ -47,7 +45,7 @@ commands=codecov -X gcov --file {toxworkdir}/coverage.xml
4745
deps = -r{toxinidir}/docs/requirements.txt
4846
skip_install=True
4947
commands =
50-
python {toxinidir}/bootstrap.py
48+
python -m bootstrap
5149
sphinx-build -W -b html -d {envtmpdir}/doctrees docs docs/build/html
5250
sphinx-build -W -b man -d {envtmpdir}/doctrees docs docs/build/man
5351

0 commit comments

Comments
 (0)