mirror of
ssh://git.janware.com/janware/proj/jw-pkg
synced 2026-04-25 09:35:54 +02:00
py-defs.mk: Add PY_INSTALL_INIT_PY
Add PY_INSTALL_INIT_PY ?= true to py-defs.mk. If set to false, a Python module will not try to attempt installing an existing / generated __init__.py. This is useful when installing into an exiting directory with an existing __init__.py. Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
eb216692eb
commit
226a241e8a
1 changed files with 5 additions and 1 deletions
|
|
@ -22,6 +22,8 @@ ifneq ($(PY_INSTALL_DIR),)
|
||||||
PY_INSTALL_DIR_PY ?= $(PY_INSTALL_DIR)
|
PY_INSTALL_DIR_PY ?= $(PY_INSTALL_DIR)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
PY_INSTALL_INIT_PY ?= true
|
||||||
|
|
||||||
# deduce PY_INSTALL_DIR_PY from working directory below .. python/
|
# deduce PY_INSTALL_DIR_PY from working directory below .. python/
|
||||||
ifeq ($(PY_INSTALL_DIR_PY),)
|
ifeq ($(PY_INSTALL_DIR_PY),)
|
||||||
PY_INSTALL_PKG_MOD ?= $(shell $(ECHO) $(CWD) | $(SED) 's%.*/python/%%; s%/.*%%')
|
PY_INSTALL_PKG_MOD ?= $(shell $(ECHO) $(CWD) | $(SED) 's%.*/python/%%; s%/.*%%')
|
||||||
|
|
@ -32,7 +34,9 @@ ifeq ($(PY_INSTALL_DIR_PY),)
|
||||||
PY_INSTALL_MOD ?= $(PY_INSTALL_PKG_MOD)
|
PY_INSTALL_MOD ?= $(PY_INSTALL_PKG_MOD)
|
||||||
endif
|
endif
|
||||||
PY_MOD ?= $(subst /,.,$(PY_INSTALL_MOD))
|
PY_MOD ?= $(subst /,.,$(PY_INSTALL_MOD))
|
||||||
PY_ALL_PY += __init__.py
|
ifeq ($(PY_INSTALL_INIT_PY),true)
|
||||||
|
PY_ALL_PY += __init__.py
|
||||||
|
endif
|
||||||
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))
|
||||||
else
|
else
|
||||||
ifeq ($(PY_INSTALL_DIR_PY),)
|
ifeq ($(PY_INSTALL_DIR_PY),)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue