mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 03:53:32 +01:00
projects.mk / py-defs.mk: Support Python 3.10
The current globbing pattern for filling the PYTHON variable doesn't account for the fact that /usr/bin/python3.X might have more than one digit for X, fix that Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
c87986624f
commit
17851c9d11
2 changed files with 4 additions and 2 deletions
|
|
@ -27,11 +27,12 @@ ifndef WHICH
|
||||||
WHICH := $(firstword $(wildcard /usr/bin/which) $(shell which which))
|
WHICH := $(firstword $(wildcard /usr/bin/which) $(shell which which))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# note: This is redundant to py-defs.mk
|
||||||
ifneq ($(PYTHON_VERSION),)
|
ifneq ($(PYTHON_VERSION),)
|
||||||
PYTHON := /usr/bin/python$(PYTHON_VERSION)
|
PYTHON := /usr/bin/python$(PYTHON_VERSION)
|
||||||
else
|
else
|
||||||
ifeq ($(PYTHON),)
|
ifeq ($(PYTHON),)
|
||||||
PYTHON := $(lastword $(shell ls -v /usr/bin/python[0-9].[0-9]))
|
PYTHON := $(lastword $(shell /bin/bash -O extglob -c "ls -v /usr/bin/python[0-9].+([0-9])"))
|
||||||
endif
|
endif
|
||||||
PYTHON_VERSION ?= $(patsubst python%,%,$(notdir $(PYTHON)))
|
PYTHON_VERSION ?= $(patsubst python%,%,$(notdir $(PYTHON)))
|
||||||
endif
|
endif
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,11 @@
|
||||||
ENV_PYTHONPATH := $(PYTHONPATH)
|
ENV_PYTHONPATH := $(PYTHONPATH)
|
||||||
|
|
||||||
|
# note: This is redundant to projects.mk
|
||||||
ifneq ($(PYTHON_VERSION),)
|
ifneq ($(PYTHON_VERSION),)
|
||||||
PYTHON := /usr/bin/python$(PYTHON_VERSION)
|
PYTHON := /usr/bin/python$(PYTHON_VERSION)
|
||||||
else
|
else
|
||||||
ifeq ($(PYTHON),)
|
ifeq ($(PYTHON),)
|
||||||
PYTHON := $(lastword $(shell ls -v /usr/bin/python[0-9].[0-9]))
|
PYTHON := $(lastword $(shell /bin/bash -O extglob -c "ls -v /usr/bin/python[0-9].+([0-9])"))
|
||||||
endif
|
endif
|
||||||
PYTHON_VERSION ?= $(patsubst python%,%,$(notdir $(PYTHON)))
|
PYTHON_VERSION ?= $(patsubst python%,%,$(notdir $(PYTHON)))
|
||||||
endif
|
endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue