Fix py27 tox

siblings: python2.7 ConfigParser has no __getitem__
Constrain soupsieve to <2 for python2.7
Add python2-dev to bindep for subprocess32

Change-Id: If9d6a0ae1a62a94dcec11f6bf637ffee7f0f4fc9
This commit is contained in:
Albin Vass 2020-05-27 15:04:24 +02:00
parent 0a02594e6f
commit a38becca99
4 changed files with 11 additions and 3 deletions

View File

@ -3,3 +3,8 @@ gcc [test]
# Required for openstacksdk # Required for openstacksdk
python3-devel [test platform:rpm] python3-devel [test platform:rpm]
python3-dev [test platform:dpkg platform:apk] python3-dev [test platform:dpkg platform:apk]
# Required for subprocess32
python2-devel [test platform:fedora]
python-devel [test platform:rpm !platform:fedora !platform:centos-8]
python-dev [test platform:dpkg platform:apk]

View File

@ -318,9 +318,8 @@ def main():
changed = False changed = False
for testenv in envlist: for testenv in envlist:
testenv_config = tox_config["testenv:{}".format(testenv)] envdir = tox_config.get("testenv:{}".format(testenv), 'envdir')
envdir = testenv_config['envdir'] envlogdir = tox_config.get("testenv:{}".format(testenv), 'envlogdir')
envlogdir = testenv_config['envlogdir']
try: try:
# Write a log file into the .tox dir so that it'll get picked up # Write a log file into the .tox dir so that it'll get picked up
# Name it with testenv as a prefix so that fetch-tox-output # Name it with testenv as a prefix so that fetch-tox-output

1
test-constraints.txt Normal file
View File

@ -0,0 +1 @@
soupsieve < 2.0; python_version < '3.5'

View File

@ -12,6 +12,9 @@ commands = stestr run {posargs}
stestr slowest stestr slowest
[testenv:py27] [testenv:py27]
deps =
-r{toxinidir}/test-requirements.txt
-c{toxinidir}/test-constraints.txt
basepython = python2.7 basepython = python2.7
[testenv:bindep] [testenv:bindep]