diff --git a/make/projects.mk b/make/projects.mk index 1fded724..bb2406da 100644 --- a/make/projects.mk +++ b/make/projects.mk @@ -27,11 +27,12 @@ ifndef WHICH WHICH := $(firstword $(wildcard /usr/bin/which) $(shell which which)) endif +# note: This is redundant to py-defs.mk ifneq ($(PYTHON_VERSION),) PYTHON := /usr/bin/python$(PYTHON_VERSION) else 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 PYTHON_VERSION ?= $(patsubst python%,%,$(notdir $(PYTHON))) endif diff --git a/make/py-defs.mk b/make/py-defs.mk index 9931c480..417231c4 100644 --- a/make/py-defs.mk +++ b/make/py-defs.mk @@ -1,10 +1,11 @@ ENV_PYTHONPATH := $(PYTHONPATH) +# note: This is redundant to projects.mk ifneq ($(PYTHON_VERSION),) PYTHON := /usr/bin/python$(PYTHON_VERSION) else 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 PYTHON_VERSION ?= $(patsubst python%,%,$(notdir $(PYTHON))) endif