Browse Source

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: I10eafa030e4ab97f55d17b2497fa87492a18336e
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Doug Hellmann 10 months ago
parent
commit
858f15d9e3
1 changed files with 7 additions and 1 deletions
  1. 7
    1
      tox.ini

+ 7
- 1
tox.ini View File

@@ -3,7 +3,6 @@ minversion = 2.0
3 3
 envlist = py35,py27,pep8
4 4
 
5 5
 [testenv]
6
-basepython = python3
7 6
 setenv =
8 7
     VIRTUAL_ENV={envdir}
9 8
     BRANCH_NAME=master
@@ -16,6 +15,7 @@ deps =
16 15
 commands = python setup.py testr --slowest --testr-args='{posargs}'
17 16
 
18 17
 [testenv:debug]
18
+basepython = python3
19 19
 commands = oslo_debug_helper {posargs}
20 20
 
21 21
 [testenv:debug-py27]
@@ -23,15 +23,19 @@ basepython = python2.7
23 23
 commands = oslo_debug_helper {posargs}
24 24
 
25 25
 [testenv:pep8]
26
+basepython = python3
26 27
 commands = flake8
27 28
 
28 29
 [testenv:venv]
30
+basepython = python3
29 31
 commands = {posargs}
30 32
 
31 33
 [testenv:cover]
34
+basepython = python3
32 35
 commands = python setup.py testr --coverage --testr-args='{posargs}'
33 36
 
34 37
 [testenv:docs]
38
+basepython = python3
35 39
 commands = python setup.py build_sphinx
36 40
 
37 41
 [testenv:py27]
@@ -48,9 +52,11 @@ ignore = E123,E125
48 52
 exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
49 53
 
50 54
 [testenv:releasenotes]
55
+basepython = python3
51 56
 commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
52 57
 
53 58
 [testenv:lower-constraints]
59
+basepython = python3
54 60
 deps =
55 61
   -c{toxinidir}/lower-constraints.txt
56 62
   -r{toxinidir}/test-requirements.txt

Loading…
Cancel
Save