11f05d4904
Currently, we are overriding 'install_command' to use 'pip'. This is considered poor behavior and 'python -m pip' should be used instead: https://snarky.ca/why-you-should-use-python-m-pip/ It turns out that this is the the default value provided by tox: https://tox.readthedocs.io/en/latest/config.html#conf-install_command So we can remove the line and simply use the default value. Change-Id: I9130a9202515ac7b88e7b6a99dbb6a756ac65895
99 lines
3.0 KiB
INI
99 lines
3.0 KiB
INI
[tox]
|
|
minversion = 3.1.0
|
|
skipsdist = True
|
|
envlist = validate,py27,py37,pep8,pip-install
|
|
ignore_basepython_conflict=true
|
|
|
|
[testenv]
|
|
basepython = python3
|
|
usedevelop = True
|
|
deps = -c{toxinidir}/upper-constraints.txt
|
|
-r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
commands =
|
|
stestr run {posargs}
|
|
|
|
[testenv:py27-check-uc]
|
|
basepython = python2.7
|
|
deps = -r{toxinidir}/upper-constraints.txt
|
|
commands = check-conflicts {toxinidir}/upper-constraints.txt {toxinidir}/upper-constraints-xfails.txt
|
|
|
|
[testenv:py36-check-uc]
|
|
basepython = python3.6
|
|
deps = -r{toxinidir}/upper-constraints.txt
|
|
commands = check-conflicts {toxinidir}/upper-constraints.txt {toxinidir}/upper-constraints-xfails.txt
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:update]
|
|
commands = update-requirements {posargs}
|
|
|
|
[testenv:generate]
|
|
# Generate needs an unconstrained install to get new dependencies
|
|
deps = -r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
commands = generate-constraints {posargs}
|
|
|
|
[testenv:validate]
|
|
commands =
|
|
validate-constraints {toxinidir}/global-requirements.txt {toxinidir}/upper-constraints.txt {toxinidir}/blacklist.txt
|
|
|
|
[testenv:validate-projects]
|
|
commands = validate-projects {toxinidir}/projects.txt
|
|
|
|
# TODO remove once zuul reconfigured to run linters on gate
|
|
[testenv:pep8]
|
|
deps = {[testenv:linters]deps}
|
|
whitelist_externals = {[testenv:linters]whitelist_externals}
|
|
commands = {[testenv:linters]commands}
|
|
|
|
[testenv:linters]
|
|
deps =
|
|
hacking>=1.0.0
|
|
bashate>=0.5.1
|
|
safety
|
|
whitelist_externals = bash
|
|
commands =
|
|
flake8
|
|
bash -c "find {toxinidir}/tools \
|
|
-type f \
|
|
-name \*.sh \
|
|
-print0 | xargs -0 bashate -v -iE006,E010"
|
|
bash -c 'sed -e "s,===,==," upper-constraints.txt > {envtmpdir}/safety-check.txt'
|
|
-safety check --json -r {envtmpdir}/safety-check.txt
|
|
|
|
[testenv:bindep]
|
|
# Do not install any requirements. We want this to be fast and work even if
|
|
# system dependencies are missing, since it's used to tell you what system
|
|
# dependencies are missing! This also means that bindep must be installed
|
|
# separately, outside of the requirements files, and develop mode disabled
|
|
# explicitly to avoid unnecessarily installing the checked-out repo too (this
|
|
# further relies on "tox.skipsdist = True" above).
|
|
deps = bindep
|
|
commands = bindep test
|
|
usedevelop = False
|
|
|
|
[testenv:docs]
|
|
deps = -c{env:UPPER_CONSTRAINTS_FILE:{toxinidir}/upper-constraints.txt}
|
|
-r{toxinidir}/doc/requirements.txt
|
|
commands = sphinx-build -W -b html doc/source doc/build/html
|
|
|
|
[testenv:pip-install]
|
|
recreate = True
|
|
deps = .
|
|
commands = python {toxinidir}/tools/check-install.py
|
|
|
|
[testenv:requirements-check]
|
|
deps = -r{toxinidir}/requirements.txt
|
|
commands =
|
|
{toxinidir}/playbooks/files/project-requirements-change.py --local {posargs}
|
|
|
|
[testenv:babel]
|
|
# Use the local upper-constraints.txt file
|
|
deps = Babel
|
|
commands = {toxinidir}/tools/babel-test.sh
|
|
|
|
[flake8]
|
|
exclude = .venv,.git,.tox,dist,doc,*egg,build
|