Constraints and docs requirements

Jeremy Stanley fungi at yuggoth.org
Tue Apr 5 00:03:50 UTC 2022


On 2022-04-04 16:01:08 -0700 (-0700), Michael Johnson wrote:
> After some debugging we have determined the reason for this is that
> `tox -e docs` has two steps in its installation process. The first is
> the dependency installation which respects constraints and then after
> that is the installation of the package itself (in this case
> Designate). This second step does not supply constraints info, and it
> is expected that all dependencies of the package have been
> preinstalled by the first step.
[...]

Do note that the second pip install is occurring because usedevelop
is set to True in the tox.ini. If a project doesn't set usedevelop
(which defaults to false), or explicitly sets it to false, the
project is not installed unless included in the testenv's deps.

> To resolve this issue, make sure you are including the project
> requirements along with the doc requirements in your tox environment
> dependencies section[1]. This will allow pip to install all of the
> required dependencies, those required for the documentation generation
> and those for the project, to be all installed using the upper
> constraints.
[...]

An alternative would be to turn off usedevelop and add something
like {toxinidir} or "." to the deps list in the testenv:docs entry,
making sure that the -c option to apply constraints is also included
in that deps list. This also avoids the second pip install phase, so
may shave a few seconds off the run.
-- 
Jeremy Stanley
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 963 bytes
Desc: not available
URL: <http://lists.openstack.org/pipermail/openstack-discuss/attachments/20220405/7e999aa8/attachment.sig>


More information about the openstack-discuss mailing list