From 544f0e2b3f38aa02d56b3eb64428e29685934e36 Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Wed, 26 Sep 2018 18:45:25 -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: I051f1c18b719a27372b626d483e47327085dd3b7 Signed-off-by: Doug Hellmann --- tox.ini | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tox.ini b/tox.ini index 4aad012cd..0b2aa78f5 100644 --- a/tox.ini +++ b/tox.ini @@ -24,6 +24,7 @@ commands = {toxinidir}/tools/fast8.sh [testenv:pep8] +basepython = python3 commands = flake8 bandit -r openstackclient -x tests -s B105,B106,B107,B401,B404,B603,B606,B607,B110,B605,B101 @@ -87,6 +88,7 @@ commands = {toxinidir}/openstackclient/tests/functional/run_stestr.sh {posargs} [testenv:venv] +basepython = python3 deps = -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} -r{toxinidir}/requirements.txt @@ -94,6 +96,7 @@ deps = commands = {posargs} [testenv:cover] +basepython = python3 setenv = VIRTUAL_ENV={envdir} PYTHON=coverage run --source openstackclient --parallel-mode @@ -109,6 +112,7 @@ commands = oslo_debug_helper -t openstackclient/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 @@ -118,6 +122,7 @@ commands = sphinx-build -a -E -W -d doc/build/doctrees -b man doc/source doc/build/man [testenv:releasenotes] +basepython = python3 deps = -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} -r{toxinidir}/doc/requirements.txt