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, py-version.mk: Add py-version.mk
This commit adds py-version.mk, eliminating redundancy between projects.mk and py-defs.mk in setting up the Python version early.
This commit is contained in:
parent
e53032ab9c
commit
60ef137bc3
3 changed files with 17 additions and 20 deletions
|
|
@ -1,15 +1,6 @@
|
|||
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 /bin/bash -O extglob -c "ls -v /usr/bin/python[0-9].+([0-9])"))
|
||||
endif
|
||||
PYTHON_VERSION ?= $(patsubst python%,%,$(notdir $(PYTHON)))
|
||||
endif
|
||||
PYTHON_MAJOR = $(basename $(PYTHON_VERSION))
|
||||
include $(JWBDIR)/make/py-version.mk
|
||||
|
||||
ifeq ($(DEVELOPMENT),true)
|
||||
PY_SITE_PACKAGES_PATH := $(PREFIX)/python$(PYTHON_VERSION)/site-packages
|
||||
|
|
@ -86,6 +77,7 @@ all:
|
|||
clean: pyc.clean
|
||||
|
||||
echo-py:
|
||||
@echo "PYTHON = $(PYTHON)"
|
||||
@echo "PY_INSTALL_DIR_PY = $(PY_INSTALL_DIR_PY)"
|
||||
@echo "PROJECT = $(PROJECT)"
|
||||
@echo "PY_SITE_PACKAGES_PATH = $(PY_SITE_PACKAGES_PATH)"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue