mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 03:53:32 +01:00
py-defs.mk, projects.mk: Use latest install Python
Use $(lastword $(shell ls -v /usr/bin/python[0-9]*)) for the Python version to use. Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
a82fa9023b
commit
caf33841b4
2 changed files with 12 additions and 7 deletions
|
|
@ -27,12 +27,15 @@ ifndef WHICH
|
|||
WHICH := $(firstword $(wildcard /usr/bin/which) $(shell which which))
|
||||
endif
|
||||
|
||||
ifeq ($(PYTHON),)
|
||||
PYTHON_VERSION := 3
|
||||
PYTHON := $(shell $(WHICH) python$(PYTHON_VERSION))
|
||||
ifneq ($(PYTHON_VERSION),)
|
||||
PYTHON := /usr/bin/python$(PYTHON_VERSION)
|
||||
else
|
||||
PYTHON_VERSION := $(word 2,$(subst ., ,$(shell $(PYTHON) --version)))
|
||||
ifeq ($(PYTHON),)
|
||||
PYTHON := $(lastword $(shell ls -v /usr/bin/python[0-9]*))
|
||||
endif
|
||||
PYTHON_VERSION ?= $(patsubst python%,%,$(notdir $(PYTHON)))
|
||||
endif
|
||||
PYTHON_MAJOR = $(basename $(PYTHON_VERSION))
|
||||
|
||||
ifneq ($(TOPDIR),)
|
||||
proj_query_cmd = $(PYTHON) $(JWB_SCRIPT_DIR)/projects.py -p $(PROJECTS_DIR) -t $(TOPDIR) $(PROJECTS_PY_EXTRA_ARGS)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue