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: Ie6a61e4db3f7d3f6e1c7478fab4ab4afb6c88ce1
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann 2018-06-06 15:27:01 -04:00
parent 50ef90251c
commit 66362ae0f2
1 changed files with 9 additions and 0 deletions

View File

@ -29,19 +29,23 @@ whitelist_externals = bash
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
[testenv:debug]
basepython = python3
commands =
find . -type f -name "*.pyc" -delete
oslo_debug_helper {posargs}
[testenv:pep8]
basepython = python3
commands = flake8 {posargs}
[testenv:fast8]
basepython = python3
envdir = {toxworkdir}/pep8
commands =
{toxinidir}/tools/fast8.sh
[testenv:pylint]
basepython = python3
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
-r{toxinidir}/requirements.txt
@ -49,9 +53,11 @@ deps =
commands = bash tools/lintstack.sh
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:cover]
basepython = python3
# To see the report of missing coverage add to commands
# coverage report --show-missing
setenv =
@ -64,9 +70,11 @@ commands =
coverage xml -o cover/coverage/xml
[testenv:docs]
basepython = python3
commands = python setup.py build_sphinx
[testenv:releasenotes]
basepython = python3
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[flake8]
@ -85,6 +93,7 @@ max-complexity=30
import_exceptions = os_brick.i18n
[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