From d0311560da896ec16d054a972eeaaef8b225ae82 Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Wed, 28 Jan 2026 12:44:38 +0100 Subject: [PATCH] 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 --- src/python/jw/pkg/cmds/distro/Makefile | 1 + src/python/jw/pkg/cmds/distro/__init__.py | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 src/python/jw/pkg/cmds/distro/__init__.py diff --git a/src/python/jw/pkg/cmds/distro/Makefile b/src/python/jw/pkg/cmds/distro/Makefile index 7a83c333..f342bd8e 100644 --- a/src/python/jw/pkg/cmds/distro/Makefile +++ b/src/python/jw/pkg/cmds/distro/Makefile @@ -1,4 +1,5 @@ TOPDIR = ../../../../../.. +PY_UPDATE_INIT_PY = false include $(TOPDIR)/make/proj.mk include $(JWBDIR)/make/py-mod.mk diff --git a/src/python/jw/pkg/cmds/distro/__init__.py b/src/python/jw/pkg/cmds/distro/__init__.py new file mode 100644 index 00000000..7837b8d7 --- /dev/null +++ b/src/python/jw/pkg/cmds/distro/__init__.py @@ -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)