2012-09-08 16:18:25 +02:00
|
|
|
[tox]
|
2018-10-24 20:14:14 +02:00
|
|
|
minversion = 3.4.0
|
2015-05-27 19:32:39 +02:00
|
|
|
envlist =
|
2019-10-09 17:44:54 +02:00
|
|
|
docs, packaging, lint, vendoring,
|
2020-10-08 17:31:41 +02:00
|
|
|
py27, py35, py36, py37, py38, py39, pypy, pypy3
|
2012-09-08 16:18:25 +02:00
|
|
|
|
2018-10-01 05:22:08 +02:00
|
|
|
[helpers]
|
|
|
|
# Wrapper for calls to pip that make sure the version being used is the
|
|
|
|
# original virtualenv (stable) version, and not the code being tested.
|
|
|
|
pip = python {toxinidir}/tools/tox_pip.py
|
2019-12-01 01:13:06 +01:00
|
|
|
mkdirp = python -c 'import os, sys; os.path.exists(sys.argv[1]) or os.mkdir(sys.argv[1])'
|
2018-10-01 05:22:08 +02:00
|
|
|
|
2012-09-08 16:18:25 +02:00
|
|
|
[testenv]
|
2019-08-21 11:19:02 +02:00
|
|
|
# Remove USERNAME once we drop PY2.
|
2020-03-23 09:32:20 +01:00
|
|
|
passenv =
|
|
|
|
CI
|
|
|
|
GIT_SSL_CAINFO
|
|
|
|
USERNAME
|
|
|
|
HTTP_PROXY
|
|
|
|
HTTPS_PROXY
|
|
|
|
NO_PROXY
|
2015-05-14 12:59:33 +02:00
|
|
|
setenv =
|
|
|
|
# This is required in order to get UTF-8 output inside of the subprocesses
|
|
|
|
# that our tests use.
|
|
|
|
LC_CTYPE = en_US.UTF-8
|
2019-07-30 13:31:05 +02:00
|
|
|
deps = -r{toxinidir}/tools/requirements/tests.txt
|
2018-10-08 18:09:53 +02:00
|
|
|
commands_pre =
|
2020-07-18 12:00:42 +02:00
|
|
|
python -c 'import shutil, sys; shutil.rmtree(sys.argv[1], ignore_errors=True)' {toxinidir}/tests/data/common_wheels
|
|
|
|
{[helpers]pip} wheel -w {toxinidir}/tests/data/common_wheels -r {toxinidir}/tools/requirements/tests-common_wheels.txt
|
2018-05-26 13:16:12 +02:00
|
|
|
commands = pytest --timeout 300 []
|
2018-10-01 05:22:08 +02:00
|
|
|
install_command = {[helpers]pip} install {opts} {packages}
|
|
|
|
list_dependencies_command = {[helpers]pip} freeze --all
|
2014-04-26 06:32:27 +02:00
|
|
|
|
2019-12-01 01:13:06 +01:00
|
|
|
[testenv:coverage]
|
2017-11-14 07:33:01 +01:00
|
|
|
basepython = python3
|
2019-12-01 01:13:06 +01:00
|
|
|
commands =
|
|
|
|
{[helpers]mkdirp} {toxinidir}/.coverage-output
|
|
|
|
pytest --timeout 300 --cov=pip --cov-config={toxinidir}/setup.cfg []
|
|
|
|
|
|
|
|
setenv =
|
|
|
|
# Used in coverage configuration in setup.cfg.
|
|
|
|
COVERAGE_OUTPUT_DIR = {toxinidir}/.coverage-output
|
|
|
|
# Ensure coverage is enabled in child processes in virtual environments
|
|
|
|
# since they won't already have been enabled by pytest-cov.
|
|
|
|
COVERAGE_PROCESS_START = {toxinidir}/setup.cfg
|
|
|
|
# Used in coverage configuration in setup.cfg.
|
|
|
|
PIP_CI_COVERAGE_EXCLUDES = if PY2
|
2017-11-14 07:33:01 +01:00
|
|
|
|
2013-08-28 12:31:39 +02:00
|
|
|
[testenv:docs]
|
2018-08-21 20:37:42 +02:00
|
|
|
# Don't skip install here since pip_sphinxext uses pip's internals.
|
2019-07-30 13:31:05 +02:00
|
|
|
deps = -r{toxinidir}/tools/requirements/docs.txt
|
2020-10-08 17:31:41 +02:00
|
|
|
basepython = python3
|
2017-07-06 01:56:13 +02:00
|
|
|
commands =
|
2018-08-22 08:03:19 +02:00
|
|
|
sphinx-build -W -d {envtmpdir}/doctrees/html -b html docs/html docs/build/html
|
|
|
|
# Having the conf.py in the docs/html is weird but needed because we
|
|
|
|
# can not use a different configuration directory vs source directory on RTD
|
|
|
|
# currently -- https://github.com/rtfd/readthedocs.org/issues/1543.
|
|
|
|
# That is why we have a "-c docs/html" in the next line.
|
|
|
|
sphinx-build -W -d {envtmpdir}/doctrees/man -b man docs/man docs/build/man -c docs/html
|
2014-01-27 14:29:29 +01:00
|
|
|
|
2019-08-27 10:26:13 +02:00
|
|
|
[testenv:lint]
|
2018-08-13 07:26:54 +02:00
|
|
|
skip_install = True
|
2018-10-08 18:09:53 +02:00
|
|
|
commands_pre =
|
2019-09-24 13:22:47 +02:00
|
|
|
deps = pre-commit
|
2019-07-18 12:38:39 +02:00
|
|
|
commands =
|
2019-09-25 04:27:59 +02:00
|
|
|
pre-commit run [] --all-files --show-diff-on-failure
|
2019-10-09 17:44:54 +02:00
|
|
|
|
|
|
|
[testenv:vendoring]
|
2020-10-08 17:31:41 +02:00
|
|
|
basepython = python3
|
2019-10-09 17:44:54 +02:00
|
|
|
skip_install = True
|
|
|
|
commands_pre =
|
|
|
|
deps =
|
2020-10-17 14:47:55 +02:00
|
|
|
vendoring~=0.3.3
|
2019-11-27 03:36:40 +01:00
|
|
|
# Required, otherwise we interpret --no-binary :all: as
|
|
|
|
# "do not build wheels", which fails for PEP 517 requirements
|
|
|
|
pip>=19.3.1
|
2019-10-09 17:44:54 +02:00
|
|
|
whitelist_externals = git
|
|
|
|
commands =
|
|
|
|
# Check that the vendoring is up-to-date
|
2019-12-14 23:30:25 +01:00
|
|
|
vendoring sync . -v
|
2019-10-09 17:44:54 +02:00
|
|
|
git diff --exit-code
|