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: I59ac21cb0d34f0b6767c736d0419eb6b874efca1
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Doug Hellmann 10 months ago
parent
commit
a245fd5f8f
1 changed files with 9 additions and 0 deletions
  1. 9
    0
      tox.ini

+ 9
- 0
tox.ini View File

@@ -16,6 +16,7 @@ commands =
16 16
   stestr slowest
17 17
 
18 18
 [testenv:releasenotes]
19
+basepython = python3
19 20
 deps =
20 21
   -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
21 22
   -r{toxinidir}/requirements.txt
@@ -27,6 +28,7 @@ commands =
27 28
 whitelist_externals = rm
28 29
 
29 30
 [testenv:debug]
31
+basepython = python3
30 32
 commands = oslo_debug_helper {posargs}
31 33
 
32 34
 [testenv:debug-py27]
@@ -60,17 +62,21 @@ commands =
60 62
   {toxinidir}/tools/check_logging.sh {toxinidir}/manila
61 63
 
62 64
 [testenv:genconfig]
65
+basepython = python3
63 66
 whitelist_externals = bash
64 67
 commands =
65 68
   oslo-config-generator --config-file etc/oslo-config-generator/manila.conf
66 69
 
67 70
 [testenv:genpolicy]
71
+basepython = python3
68 72
 commands = oslopolicy-sample-generator --config-file=etc/manila/manila-policy-generator.conf
69 73
 
70 74
 [testenv:venv]
75
+basepython = python3
71 76
 commands = {posargs}
72 77
 
73 78
 [testenv:docs]
79
+basepython = python3
74 80
 deps =
75 81
   -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
76 82
   -r{toxinidir}/requirements.txt
@@ -83,6 +89,7 @@ commands =
83 89
 whitelist_externals = rm
84 90
 
85 91
 [testenv:cover]
92
+basepython = python3
86 93
 setenv =
87 94
     {[testenv]setenv}
88 95
     PYTHON=coverage run --source manila --parallel-mode
@@ -109,6 +116,7 @@ deps = -r{toxinidir}/requirements.txt
109 116
 commands = python tools/lintstack.py check
110 117
 
111 118
 [testenv:api-ref]
119
+basepython = python3
112 120
 # This environment is called from CI scripts to test and publish
113 121
 # the API Ref to developer.openstack.org.
114 122
 whitelist_externals = rm
@@ -117,6 +125,7 @@ commands =
117 125
   sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
118 126
 
119 127
 [testenv:dbrevision]
128
+basepython = python3
120 129
 deps = -r{toxinidir}/requirements.txt
121 130
 commands = alembic -c manila/db/migrations/alembic.ini revision -m ""{posargs}
122 131
 

Loading…
Cancel
Save