From d689d0b8bdc2889b8ff5534e7efa79466d639838 Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Sat, 13 Jun 2026 04:49:20 +0200 Subject: [PATCH] py-path.mk: Add file Aside from PYTHONPATH, ldlibpath.mk runs jw-pkg.py for determining other paths, too, which is often unneeded and can impact performance. Split the PYTHONPATH detection into a dedicated py-path.mk, and include it from ldlibpath.mk, so it can be used instead where needed. Signed-off-by: Jan Lindemann --- make/ldlibpath.mk | 7 +------ make/py-path.mk | 6 ++++++ 2 files changed, 7 insertions(+), 6 deletions(-) create mode 100644 make/py-path.mk diff --git a/make/ldlibpath.mk b/make/ldlibpath.mk index 4ecd341e..f2590509 100644 --- a/make/ldlibpath.mk +++ b/make/ldlibpath.mk @@ -17,9 +17,4 @@ ifeq ($(origin JW_PKG_EXE_PATH),undefined) endif export PATH := $(JW_PKG_EXE_PATH) -# -- PYTHONPATH -PYTHONPATH_ENV := $(PYTHONPATH) -ifeq ($(origin JW_PKG_PYTHON_PATH),undefined) - JW_PKG_PYTHON_PATH := $(call proj_query, pythonpath $(PROJECT)) -endif -export PYTHONPATH := $(JW_PKG_PYTHON_PATH) +include $(JWBDIR)/make/py-path.mk diff --git a/make/py-path.mk b/make/py-path.mk new file mode 100644 index 00000000..0b5b2115 --- /dev/null +++ b/make/py-path.mk @@ -0,0 +1,6 @@ +# -- PYTHONPATH +PYTHONPATH_ENV := $(PYTHONPATH) +ifeq ($(origin JW_PKG_PYTHON_PATH),undefined) + JW_PKG_PYTHON_PATH := $(call proj_query, pythonpath $(PROJECT)) +endif +export PYTHONPATH := $(JW_PKG_PYTHON_PATH) -- 2.54.0