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:
parent
99386d5492
commit
8a2cd02ac7
2 changed files with 5 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -31,3 +31,6 @@ endif
|
|||
|
||||
check:
|
||||
$(PY_MYPY) $(shell /bin/bash $(JWB_SCRIPT_DIR)/scm.sh ls-files | grep '\.py$$')
|
||||
|
||||
$(PY_INSTALL_DIR_PY)/py.typed: py.typed
|
||||
$(INSTALL) -p -m $(PYMODMODE) -o $(PYMODOWNER) -g $(PYMODGROUP) $< $@
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue