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: Ia908e642ad1a3f67710d48a71d097c13b7743a5a
This commit is contained in:
huang.zhiping 2018-06-09 10:40:57 +08:00
parent ae5e3ce521
commit 3f2247327a
1 changed files with 4 additions and 0 deletions

View File

@ -13,17 +13,20 @@ usedevelop = True
commands = stestr run {posargs} commands = stestr run {posargs}
[testenv:venv] [testenv:venv]
basepython = python3
deps = -r{toxinidir}/requirements.txt deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt -r{toxinidir}/test-requirements.txt
commands = {posargs} commands = {posargs}
[testenv:pep8] [testenv:pep8]
basepython = python3
deps = hacking deps = hacking
usedevelop = False usedevelop = False
commands = commands =
flake8 flake8
[testenv:cover] [testenv:cover]
basepython = python3
setenv = PYTHON=coverage run --source microversion_parse --parallel-mode setenv = PYTHON=coverage run --source microversion_parse --parallel-mode
commands = commands =
coverage erase coverage erase
@ -35,6 +38,7 @@ whitelist_externals =
find find
[testenv:docs] [testenv:docs]
basepython = python3
commands = commands =
rm -rf doc/build rm -rf doc/build
python setup.py build_sphinx python setup.py build_sphinx