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: Ie6a36ec96e12baac3c642bef25c22e72cf08f6e5
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Doug Hellmann 6 months ago
parent
commit
478249c85b
1 changed files with 5 additions and 0 deletions
  1. 5
    0
      tox.ini

+ 5
- 0
tox.ini View File

@@ -33,6 +33,7 @@ setenv =
33 33
 
34 34
 
35 35
 [testenv:docs]
36
+basepython = python3
36 37
 deps = -r{toxinidir}/doc/requirements.txt
37 38
 commands=
38 39
     bash -c "rm -rf doc/build"
@@ -46,6 +47,7 @@ extensions = .rst
46 47
 
47 48
 
48 49
 [testenv:releasenotes]
50
+basepython = python3
49 51
 deps = -r{toxinidir}/doc/requirements.txt
50 52
 commands =
51 53
     sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
@@ -53,11 +55,13 @@ commands =
53 55
 
54 56
 # environment used by the -infra templated docs job
55 57
 [testenv:venv]
58
+basepython = python3
56 59
 commands =
57 60
     {posargs}
58 61
 
59 62
 
60 63
 [testenv:pep8]
64
+basepython = python3
61 65
 commands =
62 66
     bash -c "{toxinidir}/tests/common/test-pep8.sh"
63 67
 
@@ -91,6 +95,7 @@ commands =
91 95
 
92 96
 
93 97
 [testenv:linters]
98
+basepython = python3
94 99
 commands =
95 100
     bash -c "{toxinidir}/tests/common/test-ansible-env-prep.sh"
96 101
     {[testenv:pep8]commands}

Loading…
Cancel
Save