2 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
3dc452d9b4 |
|||
|
13ec34cc57 |
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
3dc452d9b4 |
lib.init.detect_modules(): Renovate signature
- Remove package_name and package_path from the prototype of
detect_modules(). They can and should be deduced from
namespace['__name__'] and namespace['__path__'], respectively. - Make prefix default to None, which signifies "Don't filter by
prefix". - Add an optional extend_namespace parameter, which will make the
function append the module's __name__ to its __path__. This
defaults to True, thereby adding a side effect to the function.
Which is always wanted in the case for all callers of this
function. Signed-off-by: Jan Lindemann <jan@janware.com> |
|||
|
13ec34cc57 |
lib.init.detect_modules(): Add function
Not all __init__.py modules are generated by python-tools.sh, some are needed early to make jw-pkg useful without generation, notably in jw.pkg.cmds. Add detect_modules() to unify that detection, and place it into a minimal module lib.init to not increase startup time cost. Signed-off-by: Jan Lindemann <jan@janware.com> |