jw-pkg/make/py-path.mk
Jan Lindemann 156d073885
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 3m45s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 3m31s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 3m10s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 3m1s
CI / Packaging test (push) Successful in 0s
py-path|ldlibpath.mk: Space-separate JW_PKG_XXX_PATH

The following variables contain colons as path-separators:

- JW_PKG_PYTHON_PATH - JW_PKG_EXE_PATH - JW_PKG_LD_LIBRARY_PATH

This commit makes them use spaces instead, so they can be more easily amended by Makefiles using them. Also define them in a more uniform way, and use the newly introduced PREREQ_RUN variable to fill them, which in turn can also be appended to before that.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-06-17 20:16:29 +02:00

7 lines
367 B
Makefile

# -- PYTHONPATH
PYTHONPATH_ENV := $(PYTHONPATH)
JW_PKG_PYTHON_PATH_PREREQ += $(PROJECT)
ifeq ($(origin JW_PKG_PYTHON_PATH),undefined)
JW_PKG_PYTHON_PATH := $(shell $(JW_PKG_PY) --topdir-format absolute projects pythonpath --delimiter ' ' $(PROJECT) $(PREREQ_RUN))
endif
export PYTHONPATH := $(subst $(space),:,$(JW_PKG_PYTHON_PATH))