Commit graph jw-pkg/make/py-version.mk
Author SHA1 Message Date
9e7c73bbdf
py-version.mk: Include common.mk
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 4m38s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 4m51s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 4m39s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 4m52s
CI / Packaging test (push) Successful in 0s
f5249a58 makes py-version.mk use $(WHICH) but doesn't include the defining
common.mk.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-10-24 21:50:24 +02:00
f5249a58ef
common.mk: Set WHICH to command -v
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 5m32s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 5m49s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 5m13s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 5m28s
CI / Packaging test (push) Successful in 0s
defs.mk derives WHICH from the external which binary, first from a
hardcoded /usr/bin/which path and then with a `which which` fallback, while
the probes for time, ruff, pyright, and python3 call which directly.
Systems that do not ship the which package, such as minimal containers, are
left to the shell's PATH search.

Define WHICH once in common.mk as the POSIX command -v builtin and drop the
old definition from defs.mk. Route the remaining direct which calls through
$(WHICH):

- projects-dir.mk: TIME probe
- py-check.mk: PY_CHECK_RUFF and PY_CHECK_PYRIGHT probes
- py-version.mk: PYTHON lookup

command -v runs in the /bin/sh that $(shell) already uses, so the build no
longer depends on the which package. The builtin names that command -v
reports for echo, test, pwd, and printf are safe, because every use of
those variables runs through the shell, and the bash time keyword keeps the
-p output format identical to the GNU time binary.

Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v1.3.0
Signed-off-by: Jan Lindemann <jan@janware.com>
2026-10-20 09:03:08 +02:00
60ef137bc3 projects.mk, py-defs.mk, py-version.mk: Add py-version.mk
This commit adds py-version.mk, eliminating redundancy between projects.mk and
py-defs.mk in setting up the Python version early.
2025-02-22 09:04:17 +00:00