Docs build: Add requirements.txt to deps

Since we use usedevelop=True, as a result neutron
installation happens at 'develop-inst' phase and it installs
requirements from requirements.txt without considering
tox constraints, This can lead to issue where broken
requirements are installed in docs job and as a result
it will fail.

In order to get constraints be considered for this case, add
requirements.txt to deps for docs env.

Also squashed below commit:-

Docs build: Add NOTE to not remove requirements.txt

To avoid unintentionally remove requirements.txt
from deps list from docs env, add a NOTE.

Change-Id: I6ec150a8f31bf841f1c8829719a0f08df531e53a
(cherry picked from commit 2a8187124b)

Change-Id: Ic8f6472fe708d12f8fc129729465367083e1095a
(cherry picked from commit f15baf16dd)
This commit is contained in:
yatinkarel 2022-04-28 20:17:54 +05:30
parent 704014d635
commit 7bf80231e5
1 changed files with 4 additions and 0 deletions

View File

@ -139,9 +139,13 @@ commands = {posargs}
[testenv:docs]
envdir = {toxworkdir}/docs
# Do not remove requirements.txt from deps list as without it
# upper constraints will not be used for deps listed in requirements.txt
# and may cause issues
deps =
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/yoga}
-r{toxinidir}/doc/requirements.txt
-r{toxinidir}/requirements.txt
commands = sphinx-build -W -b html doc/source doc/build/html
[testenv:pdf-docs]