fix tox python3 overrides

We want to default to running all tox environments under python 3, so
set the basepython value in each environment.

We do not want to specify a minor version number, because we do not
want to have to update the file every time we upgrade python.

We do not want to set the override once in testenv, because that
breaks the more specific versions used in default environments like
py35 and py36.

Change-Id: I450085ff6d9cc352ff38798c361cbe2fbebce263
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann 2018-06-06 16:05:58 -04:00 committed by Nguyen Hai
parent d6ea3cb42b
commit 68bc49aa3d
1 changed files with 10 additions and 0 deletions

10
tox.ini
View File

@ -21,15 +21,18 @@ commands =
python setup.py testr --slowest --testr-args='{posargs} --concurrency=1'
[testenv:pep8]
basepython = python3
usedevelop = False
deps =
commands = {toxinidir}/tools/pip-install-single-req.sh test-requirements.txt hacking
flake8
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:cover]
basepython = python3
commands =
coverage erase
find . -type f -name "*.pyc" -delete
@ -37,9 +40,11 @@ commands =
coverage report
[testenv:debug]
basepython = python3
commands = oslo_debug_helper -t congress/tests {posargs}
[testenv:bench]
basepython = python3
setenv =
TEST_BENCHMARK=true
VIRTUAL_ENV={envdir}
@ -55,15 +60,18 @@ builtins = _
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,*thirdparty/*,CongressLexer.py,CongressParser.py,contrib/*
[testenv:genconfig]
basepython = python3
deps =
commands = {toxinidir}/tools/pip-install-single-req.sh requirements.txt oslo.config
oslo-config-generator --config-file=etc/congress-config-generator.conf
oslo-config-generator --config-file=etc/congress-agent-config-generator.conf
[testenv:genpolicy]
basepython = python3
commands = oslopolicy-sample-generator --config-file etc/congress-policy-generator.conf
[testenv:docs]
basepython = python3
setenv = PYTHONHASHSEED=0
deps = -r{toxinidir}/doc/requirements.txt
-r{toxinidir}/requirements.txt
@ -71,10 +79,12 @@ commands = rm -rf doc/build doc/source/api
sphinx-build -W -b html doc/source doc/build/html
[testenv:releasenotes]
basepython = python3
deps = -r{toxinidir}/doc/requirements.txt
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:bindep]
basepython = python3
# 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