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: I5078d8e6ab1cadd0d3780a3cd4ebc14c5f05dc69
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann 2018-06-06 14:50:06 -04:00
parent 8453a60643
commit 6842b2d35a
1 changed files with 7 additions and 1 deletions

View File

@ -3,7 +3,6 @@ minversion = 2.0
envlist = py35,py27,pypy,pep8
[testenv]
basepython = python3
install_command = pip install {opts} {packages}
whitelist_externals = find
rm
@ -16,14 +15,17 @@ commands =
sphinx-build -E -W -b doctest doc/source doc/build/doctest
[testenv:pep8]
basepython = python3
commands =
flake8
doc8 doc/source
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:cover]
basepython = python3
commands =
coverage erase
find . -type f -name "*.pyc" -delete
@ -34,11 +36,13 @@ commands =
basepython = python2.7
[testenv:docs]
basepython = python3
commands =
rm -rf doc/build
sphinx-build -E -W -b html doc/source doc/build/html
[testenv:debug]
basepython = python3
commands = oslo_debug_helper {posargs}
[flake8]
@ -49,9 +53,11 @@ ignore = E123,E125
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
[testenv:releasenotes]
basepython = python3
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:lower-constraints]
basepython = python3
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt