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: I53abcd174e403ac3d6843f7f6c6320e9e9677a9d
Closes-Bug:  #1802032
Signed-off-by:  98k <18552437190@163.com>
This commit is contained in:
98k 2018-10-05 10:36:18 +00:00 committed by Filippo Inzaghi
parent b11e7ac509
commit 8b348b91d5
1 changed files with 6 additions and 1 deletions

View File

@ -7,7 +7,6 @@ skipsdist = True
client_base_dir = .
[testenv]
basepython = python3
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
setenv =
VIRTUAL_ENV={envdir}
@ -30,15 +29,19 @@ commands =
stestr --test-path={[dcclient]client_base_dir}/dcmanagerclient/tests run '{posargs}'
[testenv:pep8]
basepython = python3
commands = flake8 {posargs}
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:cover]
basepython = python3
commands = python setup.py test --coverage --testr-args='{posargs}'
[testenv:debug]
basepython = python3
commands = oslo_debug_helper {posargs}
[flake8]
@ -49,6 +52,7 @@ builtins = _
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*openstack/common*,*egg,build
[testenv:linters]
basepython = python3
# bashate ignore:
# E006 - accept long lines
# E040 - false positive on |& syntax (new in bash 4)
@ -78,6 +82,7 @@ whitelist_externals =
reno
[testenv:newnote]
basepython = python3
# Re-use the releasenotes venv
envdir = {toxworkdir}/releasenotes
deps = -r{toxinidir}/doc/requirements.txt