From 3b01c48e9acf1d72a1b6ab9fb5e97a580addb659 Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Wed, 6 Jun 2018 17:58:19 -0400 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: I81fb2e1318c7e4894b759f5bf462c71f0a6d8e69 Signed-off-by: Doug Hellmann --- tox.ini | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tox.ini b/tox.ini index be8dd2dcd..6c5e6b898 100644 --- a/tox.ini +++ b/tox.ini @@ -18,6 +18,7 @@ deps = commands = python setup.py testr --slowest --testr-args='{posargs}' [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 @@ -26,6 +27,7 @@ deps = bindep commands = bindep test [testenv:pep8] +basepython = python3 commands = flake8 [testenv:venv] @@ -33,18 +35,21 @@ commands = {posargs} passenv = * [testenv:cover] +basepython = python3 commands = python setup.py testr --coverage --testr-args='{posargs}' coverage combine coverage report -m [testenv:debug] +basepython = python3 deps = oslotest {[testenv]deps} commands = oslo_debug_helper -t tripleoclient/tests {posargs} [testenv:docs] +basepython = python3 deps = -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} -r{toxinidir}/requirements.txt @@ -58,6 +63,7 @@ builtins = _ exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,releasenotes [testenv:genconfig] +basepython = python3 setenv = HOME={env:HOME:/home/stack} commands = @@ -65,6 +71,7 @@ commands = oslo-config-generator --config-file config-generator/standalone.conf [testenv:releasenotes] +basepython = python3 deps = -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} -r{toxinidir}/requirements.txt