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: I91abb5cb2e945abae630b07b1929ce1834d0d93d
This commit is contained in:
li.jiawang 2018-07-21 15:46:36 +08:00
parent 7d9ebea601
commit de8ef68b71

View File

@ -24,6 +24,7 @@ commands =
ostestr --serial '{posargs}'
[testenv:pep8]
basepython = python3
commands =
flake8
doc8 {posargs}
@ -31,12 +32,15 @@ commands =
{[testenv:genconfig]commands}
[testenv:genconfig]
basepython = python3
commands = {toxinidir}/tools/generate_config_file_samples.sh
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:cover]
basepython = python3
setenv =
PYTHON=coverage run --source $project --parallel-mode
commands =
@ -47,6 +51,7 @@ commands =
coverage report
[testenv:releasenotes]
basepython = python3
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:docs]
@ -72,6 +77,7 @@ exclude = ./.*,dist,doc,build,tools
ignore-path = .venv,.git,.tox,.tmp,*dragonflow/locale*,*lib/python*,dragonflow.egg*,doc/build,releasenotes/*,doc/source/contributor/api
[testenv:pylint]
basepython = python3
deps =
{[testenv]deps}
pylint