mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 03:53:32 +01:00
py-xxx.mk: Introduce PYTHON_MAJOR
Where *.pyc files are created is decided by PYTHON_MAJOR, not PYTHON_VERSION, so introduce it. Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
15f39de08f
commit
a82fa9023b
2 changed files with 5 additions and 4 deletions
|
|
@ -6,6 +6,7 @@ ifeq ($(PYTHON),)
|
|||
else
|
||||
PYTHON_VERSION ?= $(patsubst python%,%,$(notdir $(PYTHON)))
|
||||
endif
|
||||
PYTHON_MAJOR = $(basename $(PYTHON_VERSION))
|
||||
|
||||
ifeq ($(DEVELOPMENT),true)
|
||||
PY_SITE_PACKAGES_PATH := $(PREFIX)/python$(PYTHON_VERSION)/site-packages
|
||||
|
|
@ -26,7 +27,7 @@ PY_MYPY ?= mypy --ignore-missing-imports
|
|||
PY_SRC_PY ?= $(wildcard *.py)
|
||||
PY_ALL_PY = $(PY_SRC_PY)
|
||||
|
||||
ifneq ($(PYTHON_VERSION),3)
|
||||
ifneq ($(PYTHON_MAJOR),3)
|
||||
PY_PYC = $(patsubst %.py,%.pyc,$(PY_ALL_PY))
|
||||
else
|
||||
PY_CPYTHON_PREFIX := $(shell $(PYTHON) -c "import sys; print('cpython-{}{}'.format(sys.version_info[0],sys.version_info[1]))")
|
||||
|
|
@ -55,7 +56,7 @@ else
|
|||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(PYTHON_VERSION),3)
|
||||
ifeq ($(PYTHON_MAJOR),3)
|
||||
PY_INSTALL_DIR_PYC ?= $(PY_INSTALL_DIR_PY)/__pycache__
|
||||
else
|
||||
PY_INSTALL_DIR_PYC ?= $(PY_INSTALL_DIR_PY)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue