diff --git a/tox.ini b/tox.ini index c3c240b11b26..4d781f5e47e1 100644 --- a/tox.ini +++ b/tox.ini @@ -15,7 +15,6 @@ whitelist_externals = rm env make -install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} {opts} {packages} setenv = VIRTUAL_ENV={envdir} LANGUAGE=en_US @@ -26,7 +25,9 @@ setenv = PYTHONDONTWRITEBYTECODE=1 # TODO(stephenfin): Remove psycopg2 when minimum constraints is bumped to 2.8 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 = OS_DEBUG GENERATE_HASHES # 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 # during unit tests. deps = - -r{toxinidir}/test-requirements.txt + {[testenv]deps} git+https://opendev.org/openstack/placement#egg=openstack-placement commands = # NOTE(cdent): The group_regex describes how stestr will group tests into the @@ -150,8 +151,7 @@ commands = [testenv:venv] deps = - -r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt + {[testenv]deps} -r{toxinidir}/doc/requirements.txt commands = {posargs} @@ -159,7 +159,9 @@ commands = [testenv:docs] description = 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 = rm -rf doc/build/html doc/build/doctrees # Check that all JSON files don't have \r\n in line. @@ -211,7 +213,7 @@ commands = description = Build all documentation including API guides and refs. envdir = {toxworkdir}/docs -deps = -r{toxinidir}/doc/requirements.txt +deps = {[testenv:docs]deps} commands = {[testenv:docs]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 # dependencies are missing! This also means that bindep must be installed # separately, outside of the requirements files, and develop mode disabled -# explicitly to avoid unnecessarily installing the checked-out repo too (this -# further relies on "tox.skipsdist = True" above). +# explicitly to avoid unnecessarily installing the checked-out repo too usedevelop = False deps = bindep commands = bindep test [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 -install_command = pip install {opts} {packages} deps = -c{toxinidir}/lower-constraints.txt -r{toxinidir}/test-requirements.txt