summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Hellmann <doug@doughellmann.com>2018-06-06 14:50:06 -0400
committerDoug Hellmann <doug@doughellmann.com>2018-06-06 14:53:49 -0400
commit055d347c0fe5d4a0fe95e7c2adb11a62d8665bf8 (patch)
tree6c3f9ca090eadecc5e3aa99fee256c16acf2a830
parent884cee9f683ad3023ccffada4dbe1c1773cbbd40 (diff)
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: I98b578898a34f94bbe8de7bb02cd2c94626eaac7 Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Notes
Notes (review): Code-Review+2: Stephen Finucane <stephenfin@redhat.com> Workflow+1: Stephen Finucane <stephenfin@redhat.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Thu, 07 Jun 2018 10:49:58 +0000 Reviewed-on: https://review.openstack.org/572881 Project: openstack/oslo.reports Branch: refs/heads/master
-rw-r--r--tox.ini7
1 files changed, 6 insertions, 1 deletions
diff --git a/tox.ini b/tox.ini
index cf174a4..567df82 100644
--- a/tox.ini
+++ b/tox.ini
@@ -3,7 +3,6 @@ minversion = 2.0
3envlist = py35,py27,pep8 3envlist = py35,py27,pep8
4 4
5[testenv] 5[testenv]
6basepython = python3
7deps = 6deps =
8 -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} 7 -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
9 -r{toxinidir}/test-requirements.txt 8 -r{toxinidir}/test-requirements.txt
@@ -15,6 +14,7 @@ commands = python setup.py testr --slowest --testr-args='{posargs}'
15basepython = python2.7 14basepython = python2.7
16 15
17[testenv:pep8] 16[testenv:pep8]
17basepython = python3
18deps = 18deps =
19 -r{toxinidir}/test-requirements.txt 19 -r{toxinidir}/test-requirements.txt
20commands = 20commands =
@@ -23,12 +23,15 @@ commands =
23 bandit -r oslo_reports tests -n5 --skip B314,B405 23 bandit -r oslo_reports tests -n5 --skip B314,B405
24 24
25[testenv:venv] 25[testenv:venv]
26basepython = python3
26commands = {posargs} 27commands = {posargs}
27 28
28[testenv:docs] 29[testenv:docs]
30basepython = python3
29commands = python setup.py build_sphinx 31commands = python setup.py build_sphinx
30 32
31[testenv:cover] 33[testenv:cover]
34basepython = python3
32commands = python setup.py test --coverage --coverage-package-name=oslo_reports --testr-args='{posargs}' 35commands = python setup.py test --coverage --coverage-package-name=oslo_reports --testr-args='{posargs}'
33 36
34[flake8] 37[flake8]
@@ -42,9 +45,11 @@ exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
42import_exceptions = 45import_exceptions =
43 46
44[testenv:releasenotes] 47[testenv:releasenotes]
48basepython = python3
45commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html 49commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
46 50
47[testenv:lower-constraints] 51[testenv:lower-constraints]
52basepython = python3
48deps = 53deps =
49 -c{toxinidir}/lower-constraints.txt 54 -c{toxinidir}/lower-constraints.txt
50 -r{toxinidir}/test-requirements.txt 55 -r{toxinidir}/test-requirements.txt