From c8fc6326cbde8e5005d4a9c17588a0ad713d3434 Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Thu, 11 Jun 2026 11:57:01 +0200 Subject: [PATCH] py-topdir.mk: Use pythonpath --prefix for mypy_path Make use of the newly introduced --prefix option to the pythonpath command, and generate what's subseqently used to fill in mypy_path in pyproject.toml. By decoupling it from PYTHONPATH, this commit makes the creation of mypy_path less involved and easier to understand. It also obviates the need replace the relatively heavy ldlibpath.mk by the relatively lightweight projects.mk, thereby enhancing performance. Signed-off-by: Jan Lindemann --- make/py-topdir.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/make/py-topdir.mk b/make/py-topdir.mk index a58e1207..acbcb8aa 100644 --- a/make/py-topdir.mk +++ b/make/py-topdir.mk @@ -1,10 +1,10 @@ -include $(JWBDIR)/make/ldlibpath.mk +include $(JWBDIR)/make/projects.mk TD_GENERATE_FILES += pyproject.toml PY_CHECK_EXCLUDE ?= -MYPY_CONFIG_PATH = $(subst :,:$$MYPY_CONFIG_FILE_DIR/,:$(PYTHONPATH)) +MYPY_CONFIG_PATH = $(shell $(JW_PKG_PY) --topdir-format relative projects pythonpath --prefix '$$MYPY_CONFIG_FILE_DIR/' $(PROJECT)) MYPY_PATH_DIRECTIVE = mypy_path = "$(MYPY_CONFIG_PATH)" ifndef PY_CHECK_ROOTS