vext-python / vext

Use system python packages in virtualenv.
MIT License
72 stars 7 forks source link

Importing a package with vext when building documentation with sphinx will not import #73

Open NomAnor opened 4 years ago

NomAnor commented 4 years ago

Another quirk I found is when I build my documenation with

venv/bin/python setup.py build_sphinx

sphinx will import some module that will import e.g. PyQt5 and that import fails.

This will disable sphinx because we are running in a setup context: https://github.com/stuaxo/vext/blob/adea4b593ae4c82da0965ec1addaa1cd6d5b396c/vext/gatekeeper/__init__.py#L42-L44 I don't know the inner workings of vext so I can't think of a way to allow the sphinx usage.

stuaxo commented 4 years ago

Good catch. I seem to recall the check for running in setup is just so to disable vext when it's own setup is running.

The test could be tightened up so this doesn't fail, maybe it could check for some environment variable instead.