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>
14 lines
546 B
Makefile
14 lines
546 B
Makefile
# This file strives to be the most minimal piece of code to set the python
|
|
# version up
|
|
|
|
ifneq ($(PYTHON_VERSION),)
|
|
PYTHON := /usr/bin/python$(PYTHON_VERSION)
|
|
else
|
|
ifeq ($(PYTHON),)
|
|
#PYTHON := $(lastword $(shell /bin/bash -O extglob -c "ls -v /usr/bin/python[0-9].+([0-9])"))
|
|
PYTHON := $(shell $(WHICH) python3 | xargs readlink -f)
|
|
endif
|
|
PYTHON_VERSION ?= $(patsubst python%,%,$(notdir $(PYTHON)))
|
|
endif
|
|
PYTHON_MAJOR = $(basename $(PYTHON_VERSION))
|
|
|