gahjelle / pyplugs

Decorator based plugin architecture for Python
https://pypi.org/project/pyplugs/
MIT License
67 stars 4 forks source link

Support uninstalled scripts #25

Closed gahjelle closed 4 years ago

gahjelle commented 4 years ago

When using pyplugs in a script, __package__ is not set. Currently this ends up with pyplugs tring to import plugins with a leading dot, for instance import .plugin which is interpreted as a relative import, which is not allowed in this setting.

While it might still be clunky, make sure that it's possible to run pyplugs in scripts.