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: Ic4f2c660b9128a7975614b48e92b091bea5ecb27
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
changes/12/607412/1
Doug Hellmann 8 months ago
parent
commit
3ff82f9ea5
1 changed files with 5 additions and 0 deletions
  1. 5
    0
      tox.ini

+ 5
- 0
tox.ini View File

@@ -11,6 +11,7 @@ deps = -r{toxinidir}/test-requirements.txt
11 11
 whitelist_externals = bash
12 12
 
13 13
 [testenv:bindep]
14
+basepython = python3
14 15
 # Do not install any requirements. We want this to be fast and work even if
15 16
 # system dependencies are missing, since it's used to tell you what system
16 17
 # dependencies are missing! This also means that bindep must be installed
@@ -19,6 +20,7 @@ deps = bindep
19 20
 commands = bindep test
20 21
 
21 22
 [testenv:pep8]
23
+basepython = python3
22 24
 commands =
23 25
     # Run hacking/flake8 check for all python files
24 26
     bash -c "git ls-files | grep -v releasenotes |  xargs grep --binary-files=without-match \
@@ -38,6 +40,7 @@ commands =
38 40
   bash ci-scripts/ansible-lint.sh
39 41
 
40 42
 [testenv:linters]
43
+basepython = python3
41 44
 deps =
42 45
     -r{toxinidir}/test-requirements.txt
43 46
     -r{toxinidir}/ansible-requirements.txt
@@ -46,10 +49,12 @@ commands =
46 49
     {[testenv:ansible-lint]commands}
47 50
 
48 51
 [testenv:releasenotes]
52
+basepython = python3
49 53
 whitelist_externals = bash
50 54
 commands = bash -c ci-scripts/releasenotes_tox.sh
51 55
 
52 56
 [testenv:venv]
57
+basepython = python3
53 58
 commands = {posargs}
54 59
 
55 60
 [flake8]

Loading…
Cancel
Save