From c8a8f4eba156d5754998ce99e3a06ce26b04aaae Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Wed, 6 Jun 2018 14:57:00 -0400 Subject: 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: I4b329f3233ce126fb25bff6c947aa8379b991d59 Signed-off-by: Doug Hellmann --- tox.ini | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'tox.ini') diff --git a/tox.ini b/tox.ini index e3bc4ee..a7ea819 100644 --- a/tox.ini +++ b/tox.ini @@ -4,7 +4,6 @@ distribute = False envlist = py35,py27,pep8 [testenv] -basepython = python3 install_command = pip install {opts} {packages} deps = -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} @@ -15,6 +14,7 @@ commands = coverage report --show-missing [testenv:lower-constraints] +basepython = python3 deps = -c{toxinidir}/lower-constraints.txt -r{toxinidir}/test-requirements.txt @@ -24,20 +24,24 @@ deps = basepython = python2.7 [testenv:pep8] +basepython = python3 commands = flake8 # Run security linter bandit -r oslo_config -x tests -n5 [testenv:cover] +basepython = python3 commands = python setup.py test --coverage --coverage-package-name=oslo_config --testr-args='{posargs}' coverage report --show-missing [testenv:venv] +basepython = python3 commands = {posargs} [testenv:docs] +basepython = python3 whitelist_externals = rm deps = -r{toxinidir}/doc/requirements.txt commands = @@ -45,6 +49,7 @@ commands = sphinx-build -W -b html doc/source doc/build/html [testenv:bandit] +basepython = python3 commands = bandit -r oslo_config -x tests -n5 [flake8] @@ -53,6 +58,7 @@ enable-extensions = H203,H106 exclude = .tox,dist,doc,*.egg,build [testenv:releasenotes] +basepython = python3 deps = -r{toxinidir}/doc/requirements.txt commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html -- cgit v1.2.1