[Starlingx-discuss] ERROR: unknown environment with tox -e when bulding doc locally

Jeremy Stanley fungi at yuggoth.org
Thu Sep 12 19:36:52 UTC 2019


On 2019-09-12 20:50:35 +0200 (+0200), Dominig ar Foll (Intel Open Source) wrote:
[...]
> Is there any simpler way to check how a page would look before
> commiting it in  Gerrrit ?
[...]

"Simpler" is a relative term. Since tox is being used here to
abstract away building a dedicated Python virtual environment,
installing documentation build dependencies and running Sphinx
commands to convert reStructuredText markup into HTML content, you
would basically need to perform the same steps yourself instead
(make sure your current working directory is the top-level directory
of the Git repository's worktree):

    virtualenv -p python3 mydocs

    mydocs/bin/pip install -c https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt -r doc/requirements.txt

    mydocs/bin/sphinx-build -a -E -W -d doc/build/doctrees -b html doc/source doc/build/html

The commands above were inferred from the tox.ini file in that
project. Resulting content should appear in the doc/build/html
directory. Of course, I fully expect you'll see virtualenv break
there the same way it does when tox tries to call it, but it's worth
a try. I'm unable to reproduce the error on my systems so it's tough
to be certain.

As far as troubleshooting what's gone sideways with your tox setup,
what version of virtualenv are you using? I see it's calling pip
19.1.1 according to the output you quoted, but it doesn't seem to
mention the virtualenv version.

Some additional Web searching suggests this error can be a result of
using a too-new version of pip with a too-old version of virtualenv,
so if that seems to be the case you might see if you can either
upgrade the version of virtualenv to something as recent as the
version of pip (seems https://pypi.org/project/pip/#history says it
was released in May of this year so you might try virtualenv>=16.6),
or downgrade the version of pip to something contemporary with the
version of virtualenv you've got.

Another possibility is that this stems from mixing a distro package
of one with a PyPI package of the other. Linux distributions often
"debundle" or strip out "vendored" copies of libraries like the
requests package in pip's _vendor tree, and instead expect
applications to import it from an equivalent distro-provided package
as a dependency to reduce duplication. Knowing how you set up your
development environment might be useful information in trying to
guess at the reason tox is basically broken for you.
-- 
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.starlingx.io/pipermail/starlingx-discuss/attachments/20190912/d69a3c1a/attachment.sig>


More information about the Starlingx-discuss mailing list