Importing the pybuild package fails outside the packaging environment
When importing pybuild
in a regular python interpreter, it will fail unless the PORTMOD_DOWNLOAD_DIR
environment variable is set.
This doesn't cause an issue at runtime, but if you want to import pybuild in contexts outside of the packaging environment (which is useful for certain purposes like documentation), it would be helpful if it succeeded even when it's not set.
However, for some reason this works fine when generating the pybuild docs for portmod? This might be related to why DOWNLOAD_DIR
does not get documented.
It might be a good idea to deprecate DOWNLOAD_DIR
and replace it with a function, or make it an attribute of the Pybuild2 class so it can be changed between versions more easily. (see #398)
Edited by Benjamin Winger