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:48 -0400
commit6842b2d35a14999531759fd206b735b1bedcce34 (patch)
treefde9cda0e106553eca51fb49d45da1ca8bd055a4
parent8453a6064356a854bf7fb660e4d0a6e58dd73638 (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: I5078d8e6ab1cadd0d3780a3cd4ebc14c5f05dc69 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:56 +0000 Reviewed-on: https://review.openstack.org/572873 Project: openstack/futurist Branch: refs/heads/master
-rw-r--r--tox.ini8
1 files changed, 7 insertions, 1 deletions
diff --git a/tox.ini b/tox.ini
index 8d54d65..9d72f3e 100644
--- a/tox.ini
+++ b/tox.ini
@@ -3,7 +3,6 @@ minversion = 2.0
3envlist = py35,py27,pypy,pep8 3envlist = py35,py27,pypy,pep8
4 4
5[testenv] 5[testenv]
6basepython = python3
7install_command = pip install {opts} {packages} 6install_command = pip install {opts} {packages}
8whitelist_externals = find 7whitelist_externals = find
9 rm 8 rm
@@ -16,14 +15,17 @@ commands =
16 sphinx-build -E -W -b doctest doc/source doc/build/doctest 15 sphinx-build -E -W -b doctest doc/source doc/build/doctest
17 16
18[testenv:pep8] 17[testenv:pep8]
18basepython = python3
19commands = 19commands =
20 flake8 20 flake8
21 doc8 doc/source 21 doc8 doc/source
22 22
23[testenv:venv] 23[testenv:venv]
24basepython = python3
24commands = {posargs} 25commands = {posargs}
25 26
26[testenv:cover] 27[testenv:cover]
28basepython = python3
27commands = 29commands =
28 coverage erase 30 coverage erase
29 find . -type f -name "*.pyc" -delete 31 find . -type f -name "*.pyc" -delete
@@ -34,11 +36,13 @@ commands =
34basepython = python2.7 36basepython = python2.7
35 37
36[testenv:docs] 38[testenv:docs]
39basepython = python3
37commands = 40commands =
38 rm -rf doc/build 41 rm -rf doc/build
39 sphinx-build -E -W -b html doc/source doc/build/html 42 sphinx-build -E -W -b html doc/source doc/build/html
40 43
41[testenv:debug] 44[testenv:debug]
45basepython = python3
42commands = oslo_debug_helper {posargs} 46commands = oslo_debug_helper {posargs}
43 47
44[flake8] 48[flake8]
@@ -49,9 +53,11 @@ ignore = E123,E125
49exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build 53exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
50 54
51[testenv:releasenotes] 55[testenv:releasenotes]
56basepython = python3
52commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html 57commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
53 58
54[testenv:lower-constraints] 59[testenv:lower-constraints]
60basepython = python3
55deps = 61deps =
56 -c{toxinidir}/lower-constraints.txt 62 -c{toxinidir}/lower-constraints.txt
57 -r{toxinidir}/test-requirements.txt 63 -r{toxinidir}/test-requirements.txt