mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 12:03:31 +01:00
py-*.mk: Fix python version detection
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
ae48f6aab6
commit
956aea82eb
2 changed files with 3 additions and 3 deletions
|
|
@ -20,7 +20,7 @@ PY_PROJ_MODULES += $(dir $(wildcard $(PY_MODULE_DIRS)/*/__init__.py)
|
||||||
PY_MODULES ?= $(PY_PROJ_MODULES)
|
PY_MODULES ?= $(PY_PROJ_MODULES)
|
||||||
PY_SRC_PY ?= $(wildcard *.py)
|
PY_SRC_PY ?= $(wildcard *.py)
|
||||||
PY_ALL_PY = $(sort $(PY_SRC_PY) __init__.py)
|
PY_ALL_PY = $(sort $(PY_SRC_PY) __init__.py)
|
||||||
ifneq ($(PYTHON),python3)
|
ifneq ($(PYTHON_VERSION),3)
|
||||||
PY_PYC = $(patsubst %.py,%.pyc,$(PY_ALL_PY))
|
PY_PYC = $(patsubst %.py,%.pyc,$(PY_ALL_PY))
|
||||||
else
|
else
|
||||||
PY_PYC = $(patsubst %.py,__pycache__/%.cpython-37.pyc,$(PY_ALL_PY))
|
PY_PYC = $(patsubst %.py,__pycache__/%.cpython-37.pyc,$(PY_ALL_PY))
|
||||||
|
|
@ -35,7 +35,7 @@ else
|
||||||
endif
|
endif
|
||||||
PY_MOD ?= $(subst /,.,$(PY_INSTALL_MOD))
|
PY_MOD ?= $(subst /,.,$(PY_INSTALL_MOD))
|
||||||
PY_INSTALL_DIR_PY ?= $(ENV_PREFIX)$(PY_SITE_PACKAGES_PATH)/$(patsubst .,/,$(PY_INSTALL_MOD))
|
PY_INSTALL_DIR_PY ?= $(ENV_PREFIX)$(PY_SITE_PACKAGES_PATH)/$(patsubst .,/,$(PY_INSTALL_MOD))
|
||||||
ifeq ($(PYTHON),python3)
|
ifeq ($(PYTHON_VERSION),3)
|
||||||
PY_INSTALL_DIR_PYC ?= $(PY_INSTALL_DIR_PY)/__pycache__
|
PY_INSTALL_DIR_PYC ?= $(PY_INSTALL_DIR_PY)/__pycache__
|
||||||
endif
|
endif
|
||||||
PY_INSTALL_DIRS ?= $(PY_INSTALL_DIR_PY) $(PY_INSTALL_DIR_PYC)
|
PY_INSTALL_DIRS ?= $(PY_INSTALL_DIR_PY) $(PY_INSTALL_DIR_PYC)
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ install-reg.done: install-dirs.done $(PY_INSTALLED_REG)
|
||||||
$(PY_INSTALL_DIR_PY)/%.py: %.py
|
$(PY_INSTALL_DIR_PY)/%.py: %.py
|
||||||
$(INSTALL) -p -m $(PYMODMODE) -o $(PYMODOWNER) -g $(PYMODGROUP) $< $@
|
$(INSTALL) -p -m $(PYMODMODE) -o $(PYMODOWNER) -g $(PYMODGROUP) $< $@
|
||||||
|
|
||||||
ifneq ($(PYTHON),python3)
|
ifneq ($(PYTHON_VERSION),3)
|
||||||
%.pyc: %.py
|
%.pyc: %.py
|
||||||
else
|
else
|
||||||
__pycache__/%.cpython-37.pyc: %.py
|
__pycache__/%.cpython-37.pyc: %.py
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue