py-defs.mk: Honour PY_INSTALL_INIT_PY = false #75

Merged
Jan Lindemann merged 1 commit from jan/feature/20260822-py-defs-mk-honor-py-install-init-py-false into master 2026-08-22 10:20:22 +02:00 AGit

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.

#### 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.
py-defs.mk: Honor PY_INSTALL_INIT_PY = false
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 8m8s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 4m12s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 7m43s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 3m58s
CI / Packaging test (push) Successful in 0s
bd78657588
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 <jan@janware.com>
Jan Lindemann scheduled this pull request to auto merge when all checks succeed 2026-08-22 10:07:58 +02:00
Jan Lindemann changed title from py-defs.mk: Honor PY_INSTALL_INIT_PY = false to py-defs.mk: Honour PY_INSTALL_INIT_PY = false 2026-08-22 18:39:35 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
janware/jw-pkg!75
No description provided.