mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 12:03:31 +01:00
This commit adds py-version.mk, eliminating redundancy between projects.mk and py-defs.mk in setting up the Python version early.
14 lines
543 B
Makefile
14 lines
543 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))
|
|
|