From 6842b2d35a14999531759fd206b735b1bedcce34 Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Wed, 6 Jun 2018 14:50:06 -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: I5078d8e6ab1cadd0d3780a3cd4ebc14c5f05dc69 Signed-off-by: Doug Hellmann --- tox.ini | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 8d54d65..9d72f3e 100644 --- a/tox.ini +++ b/tox.ini @@ -3,7 +3,6 @@ minversion = 2.0 envlist = py35,py27,pypy,pep8 [testenv] -basepython = python3 install_command = pip install {opts} {packages} whitelist_externals = find rm @@ -16,14 +15,17 @@ commands = sphinx-build -E -W -b doctest doc/source doc/build/doctest [testenv:pep8] +basepython = python3 commands = flake8 doc8 doc/source [testenv:venv] +basepython = python3 commands = {posargs} [testenv:cover] +basepython = python3 commands = coverage erase find . -type f -name "*.pyc" -delete @@ -34,11 +36,13 @@ commands = basepython = python2.7 [testenv:docs] +basepython = python3 commands = rm -rf doc/build sphinx-build -E -W -b html doc/source doc/build/html [testenv:debug] +basepython = python3 commands = oslo_debug_helper {posargs} [flake8] @@ -49,9 +53,11 @@ ignore = E123,E125 exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build [testenv:releasenotes] +basepython = python3 commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html [testenv:lower-constraints] +basepython = python3 deps = -c{toxinidir}/lower-constraints.txt -r{toxinidir}/test-requirements.txt