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: I81fb2e1318c7e4894b759f5bf462c71f0a6d8e69
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann 2018-06-06 17:58:19 -04:00
parent 05af8a792b
commit 3b01c48e9a

View File

@ -18,6 +18,7 @@ deps =
commands = python setup.py testr --slowest --testr-args='{posargs}'
[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
@ -26,6 +27,7 @@ deps = bindep
commands = bindep test
[testenv:pep8]
basepython = python3
commands = flake8
[testenv:venv]
@ -33,18 +35,21 @@ commands = {posargs}
passenv = *
[testenv:cover]
basepython = python3
commands =
python setup.py testr --coverage --testr-args='{posargs}'
coverage combine
coverage report -m
[testenv:debug]
basepython = python3
deps =
oslotest
{[testenv]deps}
commands = oslo_debug_helper -t tripleoclient/tests {posargs}
[testenv:docs]
basepython = python3
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
-r{toxinidir}/requirements.txt
@ -58,6 +63,7 @@ builtins = _
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,releasenotes
[testenv:genconfig]
basepython = python3
setenv =
HOME={env:HOME:/home/stack}
commands =
@ -65,6 +71,7 @@ commands =
oslo-config-generator --config-file config-generator/standalone.conf
[testenv:releasenotes]
basepython = python3
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
-r{toxinidir}/requirements.txt