From 05c1cbdbeb456ca0d28b11bf78c7aff8bd004fde Mon Sep 17 00:00:00 2001 From: 98k <18552437190@163.com> Date: Mon, 8 Oct 2018 08:01:05 +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: I566890ccc021260b785190b6c40b96ae415f2eac --- tox.ini | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tox.ini b/tox.ini index d8c3d3e8..cd069b0f 100644 --- a/tox.ini +++ b/tox.ini @@ -27,6 +27,7 @@ commands = doc8 -e '' security-threat-analysis [testenv:checkbuild] +basepython = python3 commands = # Build and copy RST Guides {toxinidir}/tools/build-all-rst.sh @@ -34,6 +35,7 @@ commands = openstack-indexpage publish-docs [testenv:publishdocs] +basepython = python3 # Prepare all documents so that they can get published on # docs.openstack.org with just copying publish-docs/* over. commands = @@ -41,10 +43,12 @@ commands = {toxinidir}/tools/build-all-rst.sh [testenv:checklang] +basepython = python3 whitelist_externals = doc-tools-check-languages commands = doc-tools-check-languages doc-tools-check-languages.conf test all [testenv:buildlang] +basepython = python3 # Run as "tox -e buildlang -- $LANG" whitelist_externals = doc-tools-check-languages @@ -55,6 +59,7 @@ commands = bash -c "find security-guide -type f -regex '.*\.pot?' -print0|xargs -0 -n 1 msgfmt --check-format -o /dev/null" [testenv:publishlang] +basepython = python3 whitelist_externals = doc-tools-check-languages commands = doc-tools-check-languages doc-tools-check-languages.conf test all @@ -65,6 +70,7 @@ commands = {toxinidir}/tools/build-all-rst.sh [testenv:generatepot-rst] +basepython = python3 # Generate POT files for translation, needs {posargs} like: # tox -e generatepot-rst -- security-guide commands = {toxinidir}/tools/generatepot-rst.sh {posargs}