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: If807d4aba6e1dac661f6a380f4309d4563510106
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann 2018-06-06 15:27:00 -04:00
parent d8cd9860de
commit ce39e2aa44
1 changed files with 8 additions and 0 deletions

View File

@ -26,6 +26,7 @@ basepython = python2.7
setenv = OS_TEST_PATH=./kuryr/tests/fullstack setenv = OS_TEST_PATH=./kuryr/tests/fullstack
[testenv:debug] [testenv:debug]
basepython = python3
commands = oslo_debug_helper -t kuryr/tests {posargs} commands = oslo_debug_helper -t kuryr/tests {posargs}
[testenv:debug-py27] [testenv:debug-py27]
@ -37,18 +38,22 @@ basepython = python3.5
commands = oslo_debug_helper -t kuryr/tests {posargs} commands = oslo_debug_helper -t kuryr/tests {posargs}
[testenv:pep8] [testenv:pep8]
basepython = python3
commands = flake8 commands = flake8
[testenv:venv] [testenv:venv]
basepython = python3
commands = {posargs} commands = {posargs}
[testenv:cover] [testenv:cover]
basepython = python3
commands = commands =
python setup.py test --coverage --testr-args='{posargs}' \ python setup.py test --coverage --testr-args='{posargs}' \
--coverage-package-name=kuryr.lib --coverage-package-name=kuryr.lib
coverage report coverage report
[testenv:docs] [testenv:docs]
basepython = python3
commands = python setup.py build_sphinx commands = python setup.py build_sphinx
[flake8] [flake8]
@ -63,6 +68,7 @@ show-source = true
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,tools,.ropeproject,rally-scenarios,releasenotes exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,tools,.ropeproject,rally-scenarios,releasenotes
[testenv:pylint] [testenv:pylint]
basepython = python3
deps = deps =
{[testenv]deps} {[testenv]deps}
pylint pylint
@ -74,9 +80,11 @@ import_exceptions = neutron.i18n
local-check-factory = neutron_lib.hacking.checks.factory local-check-factory = neutron_lib.hacking.checks.factory
[testenv:genconfig] [testenv:genconfig]
basepython = python3
commands = oslo-config-generator --config-file=etc/kuryr-config-generator.conf commands = oslo-config-generator --config-file=etc/kuryr-config-generator.conf
[testenv:releasenotes] [testenv:releasenotes]
basepython = python3
commands = sphinx-build -a -W -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html commands = sphinx-build -a -W -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:lower-constraints] [testenv:lower-constraints]