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: If27b1960674af44a4de7af412550321d74f05af6
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann 2018-06-06 16:05:58 -04:00
parent c3f97d4b48
commit 0c7b6d725c
1 changed files with 10 additions and 0 deletions

10
tox.ini
View File

@ -14,15 +14,18 @@ commands = rm -f .testrepository/times.dbm
python setup.py test --slowest --testr-args='{posargs}'
[testenv:common-constraints]
basepython = python3
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
[testenv:genpolicy]
basepython = python3
sitepackages = False
envdir = {toxworkdir}/venv
commands =
oslopolicy-sample-generator --config-file=tools/config/cyborg-policy-generator.conf
[testenv:genconfig]
basepython = python3
sitepackages = False
envdir = {toxworkdir}/venv
commands =
@ -30,17 +33,21 @@ commands =
[testenv:pep8]
basepython = python3
commands = pep8 {posargs}
doc8 {posargs}
[testenv:pep8-constraints]
basepython = python3
install_command = {[testenv:common-constraints]install_command}
commands = flake8 {posargs}
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:cover]
basepython = python3
commands = python setup.py testr --coverage --testr-args='{posargs}'
[doc8]
@ -48,14 +55,17 @@ ignore-path = .venv,.git,.tox,*cyborg/locale*,*lib/python*,*cyborg.egg*,api-ref/
[testenv:docs]
basepython = python3
commands =
python setup.py build_sphinx
oslo-config-generator --config-file=tools/config/cyborg-config-generator.conf
[testenv:releasenotes]
basepython = python3
commands = sphinx-build -a -W -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:debug]
basepython = python3
commands = oslo_debug_helper -t cyborg/tests {posargs}
[pep8]