From 9a4c75231219585616673608b5d07c0406321375 Mon Sep 17 00:00:00 2001 From: "huang.zhiping" Date: Sat, 9 Jun 2018 18:49:52 +0800 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: I65ec3ce0c72467486255868bcff79c70b9bf20f8 --- tox.ini | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tox.ini b/tox.ini index 399e8c90..cd4ccdd1 100644 --- a/tox.ini +++ b/tox.ini @@ -23,15 +23,19 @@ whitelist_externals = npm commands = python manage.py test octavia_dashboard --settings=octavia_dashboard.tests.settings [testenv:pep8] +basepython = python3 commands = flake8 [testenv:venv] +basepython = python3 commands = {posargs} [testenv:cover] +basepython = python3 commands = python setup.py test --coverage --testr-args='{posargs}' [testenv:docs] +basepython = python3 whitelist_externals = rm deps = -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} @@ -43,6 +47,7 @@ commands = [testenv:releasenotes] +basepython = python3 whitelist_externals = rm deps = -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} @@ -53,15 +58,18 @@ commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html [testenv:debug] +basepython = python3 commands = oslo_debug_helper {posargs} [testenv:eslint] +basepython = python3 # npm must be installed on the system, for example # sudo apt-get install npm commands = npm install npm run lint [testenv:karma] +basepython = python3 # npm must be installed on the system, for example # sudo apt-get install npm commands = npm install