From 82e0151200989ec8cde167d5d78082c0ee2899d8 Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Wed, 6 Jun 2018 17:58:20 -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: I1ab75bc1ebaec7559f4078add7a164b152064f39 Signed-off-by: Doug Hellmann --- tox.ini | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tox.ini b/tox.ini index ccaa023c..6ad97943 100644 --- a/tox.ini +++ b/tox.ini @@ -22,15 +22,18 @@ commands = [testenv:bandit] +basepython = python3 deps = -r{toxinidir}/test-requirements.txt commands = bandit -r zunclient -x tests -n5 -ll [testenv:pypy] +basepython = python3 deps = setuptools<3.2 -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt [testenv:debug] +basepython = python3 commands = oslo_debug_helper -t zunclient/tests {posargs} [testenv:debug-py27] @@ -42,6 +45,7 @@ basepython = python3.4 commands = oslo_debug_helper -t zunclient/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 @@ -50,12 +54,14 @@ commands = sphinx-build -W -b html doc/source doc/build/html [testenv:pep8] +basepython = python3 commands = flake8 # Run security linter bandit -r zunclient -x tests -n5 -ll [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 @@ -64,9 +70,11 @@ commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html [testenv:venv] +basepython = python3 commands = {posargs} [testenv:cover] +basepython = python3 commands = {toxinidir}/tools/cover.sh {posargs} [flake8]