From 60fba7239eb49c1fdd1285f728fe986522b2715f Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Wed, 6 Jun 2018 16:06:02 -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: I23197a23001cd28f7137fa5741a8a7ddcc05c101 Signed-off-by: Doug Hellmann --- tox.ini | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tox.ini b/tox.ini index f6c0b18ae..c774dc418 100644 --- a/tox.ini +++ b/tox.ini @@ -25,11 +25,13 @@ whitelist_externals = find [testenv:unit-postgresql] +basepython = python3 setenv = VIRTUAL_ENV={envdir} passenv = ZUUL_PROJECT commands = ./run_tests.sh -N --db-type postgresql [testenv:unit-mysql] +basepython = python3 setenv = VIRTUAL_ENV={envdir} passenv = ZUUL_PROJECT commands = ./run_tests.sh -N --db-type mysql @@ -42,6 +44,7 @@ commands = flake8 {posargs} . {toxinidir}/tools/get_action_list.py {toxinidir}/tools/sync_db.py [testenv:cover] +basepython = python3 setenv = PYTHON=coverage run --source $project --parallel-mode commands = @@ -51,11 +54,13 @@ commands = coverage xml -o cover/coverage.xml [testenv:genconfig] +basepython = python3 commands = oslo-config-generator --config-file tools/config/config-generator.mistral.conf \ --output-file etc/mistral.conf.sample [testenv:genpolicy] +basepython = python3 commands = oslopolicy-sample-generator --config-file tools/config/policy-generator.mistral.conf \ --output-file etc/policy.yaml.sample @@ -75,11 +80,13 @@ commands = sphinx-build -b html doc/source doc/build/html [testenv:releasenotes] +basepython = python3 commands = rm -rf releasenotes/build sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html [testenv:api-ref] +basepython = python3 # This environment is called from CI scripts to test and publish # the API Ref to developer.openstack.org. commands =