mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 03:53:32 +01:00
py-defs.mk: Support PY_INSTALL[_XXX]
Support the Makefile variables PY_INSTALL, PY_INSTALL_REG, PY_INSTALL_PYC, all defaulting to true. They can be set to false to stop installation of whatever file type is undesired in the target. A common use case for this are __init__.cpython-313.pyc, provided by a package the installing package depends on. The prerequisite package might already provide these files for common directories. Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
146221bbcb
commit
a907a5640f
1 changed files with 16 additions and 2 deletions
|
|
@ -56,10 +56,24 @@ else
|
||||||
PY_INSTALL_DIR_PYC ?= $(PY_INSTALL_DIR_PY)
|
PY_INSTALL_DIR_PYC ?= $(PY_INSTALL_DIR_PY)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
PY_INSTALL ?= true
|
||||||
|
PY_INSTALL_REG ?= true
|
||||||
|
ifneq ($(PY_INSTALL),true)
|
||||||
|
PY_INSTALL_REG = false
|
||||||
|
endif
|
||||||
|
PY_INSTALL_PYC ?= true
|
||||||
|
ifneq ($(PY_INSTALL_REG),true)
|
||||||
|
PY_INSTALL_PYC = false
|
||||||
|
endif
|
||||||
|
|
||||||
PY_INSTALL_DIRS ?= $(sort $(PY_INSTALL_DIR_PY) $(PY_INSTALL_DIR_PYC))
|
PY_INSTALL_DIRS ?= $(sort $(PY_INSTALL_DIR_PY) $(PY_INSTALL_DIR_PYC))
|
||||||
PY_INSTALLED_PY = $(addprefix $(PY_INSTALL_DIR_PY)/,$(sort $(PY_ALL_PY)))
|
PY_INSTALLED_PY = $(addprefix $(PY_INSTALL_DIR_PY)/,$(sort $(PY_ALL_PY)))
|
||||||
PY_INSTALLED_PYC = $(addprefix $(PY_INSTALL_DIR_PY)/,$(PY_PYC))
|
ifeq ($(PY_INSTALL_PYC),true)
|
||||||
PY_INSTALLED_REG = $(PY_INSTALLED_PY) $(PY_INSTALLED_PYC)
|
PY_INSTALLED_PYC = $(addprefix $(PY_INSTALL_DIR_PY)/,$(PY_PYC))
|
||||||
|
endif
|
||||||
|
ifeq ($(PY_INSTALL_REG),true)
|
||||||
|
PY_INSTALLED_REG = $(PY_INSTALLED_PY) $(PY_INSTALLED_PYC)
|
||||||
|
endif
|
||||||
|
|
||||||
PYTHONPATH ?= $(call proj_query, pythonpath $(PROJECT) $(PY_PREREQ_RUN))
|
PYTHONPATH ?= $(call proj_query, pythonpath $(PROJECT) $(PY_PREREQ_RUN))
|
||||||
#PYTHONPATH = $(subst $(space),,$(ENV_PYTHONPATH)$(foreach d,$(PY_MODULE_DIRS),:$(d)))
|
#PYTHONPATH = $(subst $(space),,$(ENV_PYTHONPATH)$(foreach d,$(PY_MODULE_DIRS),:$(d)))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue