I have a Python app that looks for plugins via pkg_resources.iter_entry_points
.
When run directly from source checkout, this will find anything in sys.path
that fits the bill, including source checkouts that happen to have an applicable .egg-info
for setuptools
to find.
Yet when I install the package anywhere via python setup.py install
, it suddenly ceases to detect everything enumerated in sys.path
, instead only finding things that are installed alongside it in site-packages
.
pkg_resources.iter_entry_points
behaving differently for the vanilla source checkout v. the installed application? sys.path
, as it does in development?How to get it to iterate over sys.path?
pkg_resources.WorkingSet(None).iter_entry_points
Why does it behave differently? Probably because the installed package forces at least the meta data about itself into memory. Looking at the code, my guess would be that your main module has a requires attribute, but that's only an educated guess. Anyway, to force the "installed" behaviour while developing, it should be enough to run python setup.py develop
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With