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

+ 7
- 0
tox.ini View File

@@ -20,19 +20,23 @@ deps = -r{toxinidir}/requirements.txt
20 20
 commands = stestr run {posargs}
21 21
 
22 22
 [testenv:pep8]
23
+basepython = python3
23 24
 commands =
24 25
   flake8
25 26
   bandit -r keystonemiddleware -x tests -n5
26 27
 
27 28
 [testenv:bandit]
29
+basepython = python3
28 30
 # NOTE(browne): This is required for the integration test job of the bandit
29 31
 # project. Please do not remove.
30 32
 commands = bandit -r keystonemiddleware -x tests -n5
31 33
 
32 34
 [testenv:venv]
35
+basepython = python3
33 36
 commands = {posargs}
34 37
 
35 38
 [testenv:cover]
39
+basepython = python3
36 40
 setenv =
37 41
     {[testenv]setenv}
38 42
     PYTHON=coverage run --source keystonemiddleware --parallel-mode
@@ -43,6 +47,7 @@ commands =
43 47
     coverage xml -o cover/coverage.xml
44 48
 
45 49
 [testenv:debug]
50
+basepython = python3
46 51
 
47 52
 commands = oslo_debug_helper -t keystonemiddleware/tests {posargs}
48 53
 
@@ -58,12 +63,14 @@ show-source = True
58 63
 exclude = .venv,.tox,dist,doc,*egg,build
59 64
 
60 65
 [testenv:docs]
66
+basepython = python3
61 67
 deps = -r{toxinidir}/doc/requirements.txt
62 68
 commands=
63 69
     doc8 doc/source
64 70
     python setup.py build_sphinx
65 71
 
66 72
 [testenv:releasenotes]
73
+basepython = python3
67 74
 deps = -r{toxinidir}/doc/requirements.txt
68 75
 commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
69 76
 

Loading…
Cancel
Save