From 9a976a61c38c22b8465cc84a730686c3138c466b Mon Sep 17 00:00:00 2001 From: 98k <18552437190@163.com> Date: Fri, 5 Oct 2018 10:34:55 +0000 Subject: [PATCH] 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: I24b87db5bd80876ff631698350606aa4e23919ee Closes-Bug: #1802032 Signed-off-by: 98k <18552437190@163.com> --- tox.ini | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 2a0a44362..3d1dccd90 100644 --- a/tox.ini +++ b/tox.ini @@ -16,7 +16,6 @@ configutilities_src_dir = ../stx-config/configutilities/configutilities cgtsclient_src_dir = ../stx-config/sysinv/cgts-client/cgts-client [testenv] -basepython = python3 install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/pike} {opts} {packages} setenv = VIRTUAL_ENV={envdir} @@ -83,10 +82,12 @@ basepython = python3.4 commands = oslo_debug_helper {posargs} [testenv:pep8] +basepython = python3 deps = hacking<0.11,>=0.10.2 commands = flake8 [testenv:venv] +basepython = python3 commands = {posargs} [testenv:cover] @@ -119,6 +120,7 @@ commands = whitelist_externals = rm [testenv:newnote] +basepython = python3 # Re-use the releasenotes venv envdir = {toxworkdir}/releasenotes deps = -r{toxinidir}/doc/requirements.txt @@ -134,6 +136,7 @@ commands = whitelist_externals = rm [testenv:debug] +basepython = python3 commands = oslo_debug_helper {posargs} [flake8] @@ -144,6 +147,7 @@ builtins = _ exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build [testenv:genconfig] +basepython = python3 commands = oslo-config-generator --config-file=tools/config-generator.conf @@ -160,6 +164,7 @@ commands = pylint {posargs} dcmanager dcorch --rcfile=./pylint.rc [testenv:linters] +basepython = python3 # bashate ignore: # E006 - accept long lines # E040 - false positive on |& syntax (new in bash 4)