From bd786575886c251bd13f05ed68d38de29d4ec666 Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Fri, 21 Aug 2026 15:53:19 +0200 Subject: [PATCH] py-defs.mk: Honor PY_INSTALL_INIT_PY = false PY_ALL_PY is derived from PY_SRC_PY, which wildcards *.py in the module directory, so a checked-in __init__.py enters the install list unconditionally. PY_INSTALL_INIT_PY only gates the later append of __init__.py, which covers files generated at build time. Setting it to false thus had no effect on an existing __init__.py, which was still installed together with its .pyc. Filter __init__.py out of PY_ALL_PY. When PY_INSTALL_INIT_PY is true, the existing append adds it back, so generated and checked-in __init__.py files are installed as before. When it is false, an existing __init__.py is now excluded from PY_ALL_PY and therefore also from PY_INSTALLED_PY and PY_PYC. Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v0.84.2 Signed-off-by: Jan Lindemann --- make/py-defs.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/make/py-defs.mk b/make/py-defs.mk index a947ef26..adf3c2c3 100644 --- a/make/py-defs.mk +++ b/make/py-defs.mk @@ -20,7 +20,7 @@ else endif PY_SRC_PY ?= $(wildcard *.py) -PY_ALL_PY = $(PY_SRC_PY) +PY_ALL_PY = $(filter-out __init__.py,$(PY_SRC_PY)) ifneq ($(PYTHON_MAJOR),3) PY_PYC = $(patsubst %.py,%.pyc,$(PY_ALL_PY)) -- 2.55.0