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: I6decdccb4950b5fea18bf4613cfb0755a51d5f12
98k 6 months ago
parent
commit
45f04a2559
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      tox.ini

+ 3
- 1
tox.ini View File

@@ -4,7 +4,6 @@ minversion = 2.3
4 4
 skipsdist = True
5 5
 
6 6
 [testenv]
7
-basepython = python3
8 7
 install_command = pip install -U {opts} {packages}
9 8
 setenv = VIRTUAL_ENV={envdir}
10 9
          OS_STDOUT_CAPTURE=1
@@ -13,6 +12,7 @@ setenv = VIRTUAL_ENV={envdir}
13 12
 deps = -r{toxinidir}/test-requirements.txt
14 13
 
15 14
 [testenv:linters]
15
+basepython = python3
16 16
 whitelist_externals = bash
17 17
 commands =
18 18
   bash -c "find {toxinidir} \
@@ -24,9 +24,11 @@ commands =
24 24
             -print0 | xargs -0 xmllint --noout"
25 25
 
26 26
 [testenv:venv]
27
+basepython = python3
27 28
 commands = {posargs}
28 29
 
29 30
 [testenv:true]
31
+basepython = python3
30 32
 # Use same environment directory as venv to save space and install time
31 33
 envdir = {toxworkdir}/venv
32 34
 commands = true

Loading…
Cancel
Save