py-defs.mk / py-rules.mk: install py.typed

If $(wildcard py.typed) is found in a python module directory, install it. py.typed should be used by every repo that declares properly typed code, for jw-pkg that would be at the jw.pkg node, i.e installed to <site-dir>/jw/jw-pkg/py.typed.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-05-26 13:56:57 +02:00
commit 8a2cd02ac7
Signed by: Jan Lindemann
GPG key ID: 3750640C9E25DD61
2 changed files with 5 additions and 1 deletions

View file

@ -63,11 +63,12 @@ endif
PY_INSTALL_DIRS ?= $(sort $(PY_INSTALL_DIR_PY) $(PY_INSTALL_DIR_PYC))
PY_INSTALLED_PY = $(addprefix $(PY_INSTALL_DIR_PY)/,$(sort $(PY_ALL_PY)))
PY_INSTALLED_PY_TYPED = $(addprefix $(PY_INSTALL_DIR_PY)/,$(wildcard py.typed))
ifeq ($(PY_INSTALL_PYC),true)
PY_INSTALLED_PYC = $(addprefix $(PY_INSTALL_DIR_PY)/,$(PY_PYC))
endif
ifeq ($(PY_INSTALL_REG),true)
PY_INSTALLED_REG = $(PY_INSTALLED_PY) $(PY_INSTALLED_PYC)
PY_INSTALLED_REG = $(PY_INSTALLED_PY) $(PY_INSTALLED_PYC) $(PY_INSTALLED_PY_TYPED)
endif
ifeq ($(origin PYTHONPATH),undefined)