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: I9383c8f33cf476b7c8dff184089e40aa591c6d6c
Closes-Bug:  #1802032
98k 6 months ago
parent
commit
cc79b56590
1 changed files with 4 additions and 0 deletions
  1. 4
    0
      tox.ini

+ 4
- 0
tox.ini View File

@@ -12,6 +12,7 @@ setenv = VIRTUAL_ENV={envdir}
12 12
 deps = -r{toxinidir}/test-requirements.txt
13 13
 
14 14
 [testenv:linters]
15
+basepython = python3
15 16
 whitelist_externals = bash
16 17
 commands =
17 18
   bash -c "find {toxinidir}          \
@@ -28,6 +29,7 @@ commands =
28 29
             -print0 | xargs -0 yamllint"
29 30
 
30 31
 [testenv:pep8]
32
+basepython = python3
31 33
 usedevelop = False
32 34
 skip_install = True
33 35
 deps =
@@ -36,6 +38,7 @@ commands =
36 38
     pep8
37 39
 
38 40
 [testenv:venv]
41
+basepython = python3
39 42
 commands = {posargs}
40 43
 
41 44
 [testenv:docs]
@@ -57,6 +60,7 @@ whitelist_externals =
57 60
     reno
58 61
 
59 62
 [testenv:newnote]
63
+basepython = python3
60 64
 # Re-use the releasenotes venv
61 65
 envdir = {toxworkdir}/releasenotes
62 66
 deps = -r{toxinidir}/doc/requirements.txt

Loading…
Cancel
Save