From 256f294b8b1ce958f392a4b639369f2ed5798ac9 Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Thu, 8 Oct 2026 19:34:06 +0200 Subject: [PATCH 1/3] py-path.mk: Include platform.mk for JW_PKG_PY py-path.mk invokes $(JW_PKG_PY) to compute JW_PKG_PYTHON_PATH, but does not include the file that defines the variable. Not a problem from inside jw-pkg, but nice to have if you want to include std-targets.mk and py-defs.mk without anything else, so include it. Also drop a dead debug line in the py-path target. Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v1.1.0 Signed-off-by: Jan Lindemann --- make/py-path.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/make/py-path.mk b/make/py-path.mk index 64c03dab..d1c96a3d 100644 --- a/make/py-path.mk +++ b/make/py-path.mk @@ -1,4 +1,5 @@ -# -- PYTHONPATH +include $(JWBDIR)/make/platform.mk # For JW_PKG_PY + PYTHONPATH_ENV := $(PYTHONPATH) ifeq ($(origin JW_PKG_PYTHON_PATH),undefined) JW_PKG_PYTHON_PATH := $(shell $(JW_PKG_PY) --topdir-format absolute projects pythonpath --delimiter ' ' $(PROJECT) $(PREREQ_RUN)) @@ -14,4 +15,3 @@ py-tools.clean: py-path: @echo "PYTHONPATH=$(PYTHONPATH)" - @#echo "MYPYPATH=$(MYPYPATH)" -- 2.56.0 From 66d1a117a4486c179ea87caddd56b4f9aaaec601 Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Fri, 9 Oct 2026 07:37:22 +0200 Subject: [PATCH 2/3] platform.mk: Define empty, space, comma The PYTHONPATH export in py-path.mk is built by substituting the spaces of the space-separated JW_PKG_PYTHON_PATH list with colons, using "space" from defs.mk. Which may not be included if somebody wants to include a bare py-defs.mk, so define it in platform.mk. Not happening in jw-pkg, but nice to have. Signed-off-by: Jan Lindemann --- make/defs.mk | 4 ---- make/platform.mk | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/make/defs.mk b/make/defs.mk index 73149126..78f856ca 100644 --- a/make/defs.mk +++ b/make/defs.mk @@ -7,10 +7,6 @@ JW_PKG_DEF_MK_INCLUDED = true MAKEFLAGS += -r -empty := -space := $(empty) $(empty) -comma := , - include $(JWBDIR)/make/projects.mk # ----- Executables diff --git a/make/platform.mk b/make/platform.mk index 19a07bc8..3a2c9cc8 100644 --- a/make/platform.mk +++ b/make/platform.mk @@ -3,6 +3,10 @@ ifndef PLATFORM_MK_INCLUDED PLATFORM_MK_INCLUDED = true +empty := +space := $(empty) $(empty) +comma := , + CACHE_PROJECT_MK ?= $(TOPDIR)/.cache-project.mk CACHE_PROJECTS_MK := $(JWBDIR)/.cache-projects.mk JW_PKG_NO_CACHE ?= false -- 2.56.0 From 85ddd44cd1cad796cb94d1ecf69f327f9645a228 Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Sun, 11 Oct 2026 18:06:53 +0200 Subject: [PATCH 3/3] py-defs.mk: Define PYTHON_RUNNER PYTHON_RUNNER is defined in py-run.mk but is more generally useful, e.g. for hand-rolled test Makefiles. It's also a cheap definition. Lift it into py-defs.mk instead. Signed-off-by: Jan Lindemann Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v1.1.0 --- make/py-defs.mk | 2 ++ make/py-run.mk | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/make/py-defs.mk b/make/py-defs.mk index 98c22bbb..bf8f06fa 100644 --- a/make/py-defs.mk +++ b/make/py-defs.mk @@ -19,6 +19,8 @@ else PY_SITE_PACKAGES_PATH := $(shell $(PYTHON) -c "import site; print([d for d in site.getsitepackages() if d.find('/local/') == -1][0])") endif +PYTHON_RUNNER ?= $(PYTHON) + PY_SRC_PY ?= $(wildcard *.py) PY_LOCAL_PY = $(PY_SRC_PY) PY_INSTALL_PY = $(filter-out __init__.py,$(PY_SRC_PY)) diff --git a/make/py-run.mk b/make/py-run.mk index 629f88b1..af042bc6 100644 --- a/make/py-run.mk +++ b/make/py-run.mk @@ -5,7 +5,6 @@ include $(JWBDIR)/make/run-success.mk EXE ?= $(firstword $(wildcard main.py runme.py test.py *.py)) EXE_ARGS ?= -PYTHON_RUNNER ?= $(PYTHON) all: install: -- 2.56.0