From 69b23ef7dec71da1189d26ecbc850fd3b0f454c5 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: I31a207868c07e08ae27c14635d52506021032cb7 Signed-off-by: Doug Hellmann --- tox.ini | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 7983cb45..f1db2f1e 100644 --- a/tox.ini +++ b/tox.ini @@ -3,7 +3,6 @@ minversion = 2.0 envlist = py35,py27,pep8 [testenv] -basepython = python3 install_command = pip install {opts} {packages} whitelist_externals = bash env @@ -26,6 +25,7 @@ commands = passenv = OS_TEST_DBAPI_ADMIN_CONNECTION [testenv:sqla_09] +basepython = python3 commands = pip install SQLAlchemy>=0.9.0,!=0.9.5,<1.0.0 python setup.py testr --slowest --testr-args='{posargs}' @@ -36,24 +36,29 @@ commands = env TEST_EVENTLET=1 bash tools/pretty_tox.sh '{posargs}' [testenv:pep8] +basepython = python3 commands = flake8 # Run security linter bandit -r oslo_db -x tests -n5 --skip B105,B311 [testenv:venv] +basepython = python3 commands = {posargs} [testenv:cover] +basepython = python3 commands = python setup.py test --coverage --coverage-package-name=oslo_db --testr-args='{posargs}' [testenv:docs] +basepython = python3 deps = -r{toxinidir}/doc/requirements.txt commands = doc8 -e .rst CONTRIBUTING.rst HACKING.rst README.rst doc/source sphinx-build -b html doc/source doc/build/html [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 @@ -68,6 +73,7 @@ import_exceptions = oslo_db._i18n [testenv:lower-constraints] +basepython = python3 deps = -c{toxinidir}/lower-constraints.txt -r{toxinidir}/test-requirements.txt