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

+ 5
- 0
tox.ini View File

@@ -36,6 +36,7 @@ commands =
36 36
   ostestr {posargs}
37 37
 
38 38
 [testenv:cover]
39
+basepython = python3
39 40
 description = Calculates code coverage
40 41
 setenv =
41 42
     PYTHON=coverage run --source monasca_events_api --parallel-mode
@@ -69,6 +70,7 @@ commands =
69 70
   flake8 monasca_events_api
70 71
 
71 72
 [testenv:pep8]
73
+basepython = python3
72 74
 description = Runs set of linters against codebase (flake8, bandit, bashate, checkniceness)
73 75
 commands =
74 76
   {[testenv:flake8]commands}
@@ -78,6 +80,7 @@ commands =
78 80
   python setup.py check --restructuredtext --strict
79 81
 
80 82
 [testenv:docs]
83
+basepython = python3
81 84
 description = Builds api-ref, releasenotes and devdocs
82 85
 commands =
83 86
   {[testenv:devdocs]commands}
@@ -92,6 +95,7 @@ commands =
92 95
   sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
93 96
 
94 97
 [testenv:releasenotes]
98
+basepython = python3
95 99
 description = Called from CI script to test and publish the Release Notes
96 100
 commands =
97 101
   rm -rf releasenotes/build
@@ -134,6 +138,7 @@ description = Generates sample policy.yaml file for monasca-events-api
134 138
 commands = oslopolicy-sample-generator --config-file=config-generator/policy.conf
135 139
 
136 140
 [testenv:venv]
141
+basepython = python3
137 142
 commands = {posargs}
138 143
 
139 144
 [flake8]

Loading…
Cancel
Save