Don't use install_command with tox

When tox py37 target is called, first it installs the dependencies
(listed in 'deps') in 'installdeps' phase, then it installs
tripleo-ansible with install_command in 'develop-inst' phase.
And installdeps phase would install the wrong setuptools not
constrained with uc[1] and hence the failure.

Also, adds setuptools to requirements.

[1] https://review.opendev.org/c/openstack/requirements/+/830960

Related-Bug: #1962232
Change-Id: I5b23a7649a4061dae3bc24a947022b027d95458e
This commit is contained in:
rabi 2022-02-27 21:45:32 +05:30
parent b7f71c95c5
commit 561359b01d
2 changed files with 7 additions and 5 deletions

View File

@ -1,2 +1,3 @@
pbr>=1.6
setuptools>=57.5.0
paunch>=5.1.0 # Apache-2.0

11
tox.ini
View File

@ -5,7 +5,6 @@ skipdist = True
[testenv]
usedevelop = True
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/train} {opts} {packages}
passenv = *
setenv =
VIRTUAL_ENV={envdir}
@ -20,7 +19,6 @@ setenv =
ANSIBLE_RETRY_FILES_ENABLED=0
ANSIBLE_STDOUT_CALLBACK=debug
ANSIBLE_LOG_PATH={envlogdir}/ansible-execution.log
VIRTUAL_ENV={envdir}
# pip: Avoid 2020-01-01 warnings: https://github.com/pypa/pip/issues/6207
# paramiko CryptographyDeprecationWarning: https://github.com/ansible/ansible/issues/52598
PYTHONWARNINGS=ignore:DEPRECATION::pip._internal.cli.base_command,ignore::UserWarning
@ -29,8 +27,10 @@ setenv =
sitepackages = True
deps =
-r {toxinidir}/test-requirements.txt
-r {toxinidir}/ansible-requirements.txt
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/train}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/ansible-requirements.txt
commands = stestr run {posargs}
whitelist_externals =
bash
@ -86,7 +86,8 @@ commands =
[testenv:docs]
basepython = python3
deps =
-r {toxinidir}/doc/requirements.txt
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/train}
-r{toxinidir}/doc/requirements.txt
commands=
doc8 doc
sphinx-build -a -E -W -d doc/build/doctrees -b html doc/source doc/build/html -T