From 72e32b705734dad69418155c2ac5ab6fd86dea73 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: I6517c605ff16f459d5b116c733c1674201b024d8 Signed-off-by: Doug Hellmann --- tox.ini | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tox.ini b/tox.ini index a2ffdb81..c99f39ab 100644 --- a/tox.ini +++ b/tox.ini @@ -20,6 +20,7 @@ whitelist_externals = find passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY [testenv:debug] +basepython = python3 commands = oslo_debug_helper -t saharaclient/tests/unit {posargs} [testenv:debug-py27] @@ -31,6 +32,7 @@ basepython = python3.5 commands = oslo_debug_helper -t saharaclient/tests/unit {posargs} [testenv:cover] +basepython = python3 commands = python setup.py test --coverage --testr-args='{posargs}' coverage report @@ -39,10 +41,12 @@ commands = sitepackages = False [testenv:pep8] +basepython = python3 sitepackages = False commands = flake8 [testenv:doc8] +basepython = python3 deps = -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} -r{toxinidir}/requirements.txt @@ -51,9 +55,11 @@ deps = commands = doc8 doc/source [testenv:venv] +basepython = python3 commands = {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 @@ -63,6 +69,7 @@ commands = sphinx-build -W -b html doc/source doc/build/html [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