py-check.mk: Add file

Add py-check.mk and use it from py-topdir.mk and py-rules.mk. This
removes redundant check definitions, making sure that that checks run
from a repo's subdirectory match the checks run from its toplevel
directory.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-07-17 12:57:17 +02:00
commit eea3e5f14b
Signed by: Jan Lindemann
GPG key ID: 3750640C9E25DD61
4 changed files with 92 additions and 66 deletions

View file

@ -29,8 +29,7 @@ $(PY_INSTALL_DIR_PY)/%.pyc: %.pyc
endif
$(INSTALL) -p -m $(PYMODMODE) -o $(PYMODOWNER) -g $(PYMODGROUP) $< $@
check:
$(PY_MYPY) $(shell /bin/bash $(JWB_SCRIPT_DIR)/scm.sh ls-files | grep '\.py$$')
include $(JWBDIR)/make/py-check.mk
$(PY_INSTALL_DIR_PY)/py.typed: py.typed
$(INSTALL) -p -m $(PYMODMODE) -o $(PYMODOWNER) -g $(PYMODGROUP) $< $@