1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00
pip/tox.ini
Pradyun Gedam 10beeea0b0
Allow passing hook-ids to tox -e lint
Why: To allow running a specific hook when running locally.
2019-09-25 07:57:59 +05:30

58 lines
2 KiB
INI

[tox]
minversion = 3.4.0
envlist =
docs, packaging, lint,
py27, py35, py36, py37, py38, pypy, pypy3
[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
[testenv]
# Remove USERNAME once we drop PY2.
passenv = CI GIT_SSL_CAINFO USERNAME
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
deps = -r{toxinidir}/tools/requirements/tests.txt
commands_pre =
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
commands = pytest --timeout 300 []
install_command = {[helpers]pip} install {opts} {packages}
list_dependencies_command = {[helpers]pip} freeze --all
[testenv:coverage-py3]
basepython = python3
commands = pytest --timeout 300 --cov=pip --cov-report=term-missing --cov-report=xml --cov-report=html tests/unit {posargs}
[testenv:docs]
# Don't skip install here since pip_sphinxext uses pip's internals.
deps = -r{toxinidir}/tools/requirements/docs.txt
basepython = python3.7
commands =
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
[testenv:packaging]
skip_install = True
deps =
check-manifest
readme_renderer
commands_pre =
commands =
check-manifest
python setup.py check -m -r -s
[testenv:lint]
skip_install = True
commands_pre =
deps = pre-commit
commands =
pre-commit run [] --all-files --show-diff-on-failure