From 5c7158f017592bcb4473c34a6253994edcb1d245 Mon Sep 17 00:00:00 2001 From: Dmitry Tantsur Date: Mon, 14 Dec 2020 14:00:25 +0100 Subject: [PATCH] Avoid a full install in tox environments that do not need it Usage of usedevelop=True results in all requirements.txt dependencies always installed (without constraints) even when requirements.txt is not explicitly added. Override usedevelop for these environments. Add requirements.txt to the 'docs' environment since it imports the whole ironic in the process. Change-Id: Ibab7d9cff1bd6eccc022873d1c5f59e27e54abaf --- tox.ini | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tox.ini b/tox.ini index 800133edfb..32b229b7ae 100644 --- a/tox.ini +++ b/tox.ini @@ -31,6 +31,7 @@ deps = {[testenv]deps} commands = {toxinidir}/tools/states_to_dot.py -f {toxinidir}/doc/source/images/states.svg --format svg [testenv:pep8] +usedevelop = False deps= hacking>=3.1.0,<4.0.0 # Apache-2.0 doc8>=0.6.0 # Apache-2.0 @@ -76,8 +77,10 @@ commands = commands = oslo_debug_helper -t ironic/tests/unit {posargs} [testenv:docs] +# NOTE(dtantsur): documentation building process requires importing ironic deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} + -r{toxinidir}/requirements.txt -r{toxinidir}/doc/requirements.txt commands = sphinx-build -b html -W doc/source doc/build/html @@ -90,6 +93,7 @@ commands = [testenv:api-ref] +usedevelop = False deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/doc/requirements.txt @@ -99,6 +103,7 @@ commands = sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html [testenv:releasenotes] +usedevelop = False deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/doc/requirements.txt @@ -162,5 +167,6 @@ deps = -r{toxinidir}/requirements.txt [testenv:bandit] +usedevelop = False deps = -r{toxinidir}/test-requirements.txt commands = bandit -r ironic -x tests -n5 -ll -c tools/bandit.yml