tox: Stop overriding the 'install_command'

This is not encouraged by infra (particularly mordred and smcginnis)
since it's less obvious and easy to miss.

Change-Id: Ieb4ab13cf8ca5683fcd7b18ed669e8a26659bff1
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
This commit is contained in:
Stephen Finucane
2019-09-25 15:57:52 +01:00
parent 2a74120b73
commit 19a0bdfec4

23
tox.ini
View File

@@ -15,7 +15,6 @@ whitelist_externals =
rm rm
env env
make make
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} {opts} {packages}
setenv = setenv =
VIRTUAL_ENV={envdir} VIRTUAL_ENV={envdir}
LANGUAGE=en_US LANGUAGE=en_US
@@ -26,7 +25,9 @@ setenv =
PYTHONDONTWRITEBYTECODE=1 PYTHONDONTWRITEBYTECODE=1
# TODO(stephenfin): Remove psycopg2 when minimum constraints is bumped to 2.8 # TODO(stephenfin): Remove psycopg2 when minimum constraints is bumped to 2.8
PYTHONWARNINGS = ignore::UserWarning:psycopg2 PYTHONWARNINGS = ignore::UserWarning:psycopg2
deps = -r{toxinidir}/test-requirements.txt deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/test-requirements.txt
passenv = passenv =
OS_DEBUG GENERATE_HASHES OS_DEBUG GENERATE_HASHES
# there is also secret magic in subunit-trace which lets you run in a fail only # there is also secret magic in subunit-trace which lets you run in a fail only
@@ -76,7 +77,7 @@ setenv = {[testenv]setenv}
# here instead of test-requirements because we do not want placement present # here instead of test-requirements because we do not want placement present
# during unit tests. # during unit tests.
deps = deps =
-r{toxinidir}/test-requirements.txt {[testenv]deps}
git+https://opendev.org/openstack/placement#egg=openstack-placement git+https://opendev.org/openstack/placement#egg=openstack-placement
commands = commands =
# NOTE(cdent): The group_regex describes how stestr will group tests into the # NOTE(cdent): The group_regex describes how stestr will group tests into the
@@ -150,8 +151,7 @@ commands =
[testenv:venv] [testenv:venv]
deps = deps =
-r{toxinidir}/requirements.txt {[testenv]deps}
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/doc/requirements.txt -r{toxinidir}/doc/requirements.txt
commands = commands =
{posargs} {posargs}
@@ -159,7 +159,9 @@ commands =
[testenv:docs] [testenv:docs]
description = description =
Build main documentation. Build main documentation.
deps = -r{toxinidir}/doc/requirements.txt deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/doc/requirements.txt
commands = commands =
rm -rf doc/build/html doc/build/doctrees rm -rf doc/build/html doc/build/doctrees
# Check that all JSON files don't have \r\n in line. # Check that all JSON files don't have \r\n in line.
@@ -211,7 +213,7 @@ commands =
description = description =
Build all documentation including API guides and refs. Build all documentation including API guides and refs.
envdir = {toxworkdir}/docs envdir = {toxworkdir}/docs
deps = -r{toxinidir}/doc/requirements.txt deps = {[testenv:docs]deps}
commands = commands =
{[testenv:docs]commands} {[testenv:docs]commands}
{[testenv:api-guide]commands} {[testenv:api-guide]commands}
@@ -261,19 +263,14 @@ import_exceptions = nova.i18n
# system dependencies are missing, since it's used to tell you what system # system dependencies are missing, since it's used to tell you what system
# dependencies are missing! This also means that bindep must be installed # dependencies are missing! This also means that bindep must be installed
# separately, outside of the requirements files, and develop mode disabled # separately, outside of the requirements files, and develop mode disabled
# explicitly to avoid unnecessarily installing the checked-out repo too (this # explicitly to avoid unnecessarily installing the checked-out repo too
# further relies on "tox.skipsdist = True" above).
usedevelop = False usedevelop = False
deps = bindep deps = bindep
commands = commands =
bindep test bindep test
[testenv:lower-constraints] [testenv:lower-constraints]
# We need our own install command to avoid upper constraints being considered
# when making the environment. Set usedevelop to false to avoid pbr installing
# requirements for us so all requirements are installed in one call to pip.
usedevelop = False usedevelop = False
install_command = pip install {opts} {packages}
deps = deps =
-c{toxinidir}/lower-constraints.txt -c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt -r{toxinidir}/test-requirements.txt