mirror of
ssh://git.janware.com/janware/proj/jw-pkg
synced 2026-04-25 09:35:54 +02:00
jw.pkg.cmds.distro: Add __init__.py
Add a hand-coded __init__.py into jw.pkg.cmds.distro. Auto-generation works fine, but has to run before it can work. For a freshly downloaded toplevel Makefile / project-dirs-minimal.mk, the targets pkg-install-xxx-deps requires a working package manager without jw-pkg built. Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
ad45ee8510
commit
d0311560da
2 changed files with 12 additions and 0 deletions
|
|
@ -1,4 +1,5 @@
|
||||||
TOPDIR = ../../../../../..
|
TOPDIR = ../../../../../..
|
||||||
|
PY_UPDATE_INIT_PY = false
|
||||||
|
|
||||||
include $(TOPDIR)/make/proj.mk
|
include $(TOPDIR)/make/proj.mk
|
||||||
include $(JWBDIR)/make/py-mod.mk
|
include $(JWBDIR)/make/py-mod.mk
|
||||||
|
|
|
||||||
11
src/python/jw/pkg/cmds/distro/__init__.py
Normal file
11
src/python/jw/pkg/cmds/distro/__init__.py
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
import importlib, pkgutil
|
||||||
|
|
||||||
|
__all__ = []
|
||||||
|
|
||||||
|
for finder, module_name, ispkg in pkgutil.iter_modules(__path__):
|
||||||
|
if not module_name.startswith("Cmd"):
|
||||||
|
continue
|
||||||
|
module = importlib.import_module(f".{module_name}", __name__)
|
||||||
|
cls = getattr(module, module_name)
|
||||||
|
globals()[module_name] = cls
|
||||||
|
__all__.append(module_name)
|
||||||
Loading…
Add table
Add a link
Reference in a new issue