summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Hellmann <doug@doughellmann.com>2018-06-06 15:27:00 -0400
committerDoug Hellmann <doug@doughellmann.com>2018-06-06 16:55:25 -0400
commit29ef02a51d0103e03a8ce996f700149def938594 (patch)
tree556453e853500b821ddc722d7e92cab7eaafca31
parent64b5e9e8821d5fbb0eb086b4e88dc18a822b5f76 (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: I21491f302cbc6ca7a9b5ac12c487cf214bf4866e Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Notes
Notes (review): Code-Review+2: Morgan Fainberg <morgan.fainberg@gmail.com> Workflow+1: Morgan Fainberg <morgan.fainberg@gmail.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Thu, 07 Jun 2018 00:00:12 +0000 Reviewed-on: https://review.openstack.org/572907 Project: openstack/keystonemiddleware Branch: refs/heads/master
-rw-r--r--tox.ini7
1 files changed, 7 insertions, 0 deletions
diff --git a/tox.ini b/tox.ini
index 860a0a3..41e6826 100644
--- a/tox.ini
+++ b/tox.ini
@@ -20,19 +20,23 @@ deps = -r{toxinidir}/requirements.txt
20commands = stestr run {posargs} 20commands = stestr run {posargs}
21 21
22[testenv:pep8] 22[testenv:pep8]
23basepython = python3
23commands = 24commands =
24 flake8 25 flake8
25 bandit -r keystonemiddleware -x tests -n5 26 bandit -r keystonemiddleware -x tests -n5
26 27
27[testenv:bandit] 28[testenv:bandit]
29basepython = python3
28# NOTE(browne): This is required for the integration test job of the bandit 30# NOTE(browne): This is required for the integration test job of the bandit
29# project. Please do not remove. 31# project. Please do not remove.
30commands = bandit -r keystonemiddleware -x tests -n5 32commands = bandit -r keystonemiddleware -x tests -n5
31 33
32[testenv:venv] 34[testenv:venv]
35basepython = python3
33commands = {posargs} 36commands = {posargs}
34 37
35[testenv:cover] 38[testenv:cover]
39basepython = python3
36setenv = 40setenv =
37 {[testenv]setenv} 41 {[testenv]setenv}
38 PYTHON=coverage run --source keystonemiddleware --parallel-mode 42 PYTHON=coverage run --source keystonemiddleware --parallel-mode
@@ -43,6 +47,7 @@ commands =
43 coverage xml -o cover/coverage.xml 47 coverage xml -o cover/coverage.xml
44 48
45[testenv:debug] 49[testenv:debug]
50basepython = python3
46 51
47commands = oslo_debug_helper -t keystonemiddleware/tests {posargs} 52commands = oslo_debug_helper -t keystonemiddleware/tests {posargs}
48 53
@@ -58,12 +63,14 @@ show-source = True
58exclude = .venv,.tox,dist,doc,*egg,build 63exclude = .venv,.tox,dist,doc,*egg,build
59 64
60[testenv:docs] 65[testenv:docs]
66basepython = python3
61deps = -r{toxinidir}/doc/requirements.txt 67deps = -r{toxinidir}/doc/requirements.txt
62commands= 68commands=
63 doc8 doc/source 69 doc8 doc/source
64 python setup.py build_sphinx 70 python setup.py build_sphinx
65 71
66[testenv:releasenotes] 72[testenv:releasenotes]
73basepython = python3
67deps = -r{toxinidir}/doc/requirements.txt 74deps = -r{toxinidir}/doc/requirements.txt
68commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html 75commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
69 76