mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 12:03:31 +01:00
py-defs/py-mod.mk: Fix __init__.py generation
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
79d0eddbe5
commit
3f782d3f3f
3 changed files with 8 additions and 5 deletions
|
|
@ -19,4 +19,3 @@ proj_query_cmd = $(PYTHON) $(MOD_SCRIPT_DIR)/projects.py -p $(PROJECTS_D
|
|||
proj_query = $(shell $(proj_query_cmd) $(1))
|
||||
proj_dir = $(call proj_query,proj-dir $(1))
|
||||
htdocs_dir = $(call proj_query,htdocs-dir $(1))
|
||||
|
||||
|
|
|
|||
|
|
@ -12,8 +12,9 @@ PY_PROJ_MODULE_DIRS ?= $(wildcard $(foreach subdir,/tools/python /src/python,$(
|
|||
PY_MODULE_DIRS ?= $(PY_PROJ_MODULE_DIRS)
|
||||
PY_PROJ_MODULES += $(dir $(wildcard $(PY_MODULE_DIRS)/*/__init__.py))
|
||||
PY_MODULES ?= $(PY_PROJ_MODULES)
|
||||
PY_SRC_PY = $(sort $(wildcard *.py) __init__.py)
|
||||
PY_PYC = $(patsubst %.py,%.pyc,$(PY_SRC_PY))
|
||||
PY_SRC_PY ?= $(wildcard *.py)
|
||||
PY_ALL_PY = $(sort $(PY_SRC_PY) __init__.py)
|
||||
PY_PYC = $(patsubst %.py,%.pyc,$(PY_ALL_PY))
|
||||
|
||||
PY_INSTALL_PKG_MOD ?= $(shell pwd | sed 's%.*/python/%%; s%/.*%%')
|
||||
PY_INSTALL_SUB_MOD ?= $(shell pwd | sed "s%.*/$(PY_INSTALL_PKG_MOD)\(/\|$$\)%%")
|
||||
|
|
@ -24,7 +25,7 @@ else
|
|||
endif
|
||||
PY_MOD ?= $(subst /,.,$(PY_INSTALL_MOD))
|
||||
PY_INSTALL_DIR = $(ENV_PREFIX)$(PY_SITE_PACKAGES_PATH)/$(patsubst .,/,$(PY_INSTALL_MOD))
|
||||
PY_INSTALLED_REG = $(addprefix $(PY_INSTALL_DIR)/,$(PY_SRC_PY) $(PY_PYC))
|
||||
PY_INSTALLED_REG = $(addprefix $(PY_INSTALL_DIR)/,$(PY_ALL_PY) $(PY_PYC))
|
||||
|
||||
empty :=
|
||||
space := $(empty) $(empty)
|
||||
|
|
|
|||
|
|
@ -3,7 +3,10 @@ include $(MODDIR)/make/py-defs.mk
|
|||
include $(MODDIR)/make/dirs.mk
|
||||
|
||||
PY_INIT_TMPL = $(wildcard __init__.py.tmpl)
|
||||
PY_SED_EXTRACT_EXPORT ?= /class ..*\# *export/ !d; s/class *//; s/[(:].*//
|
||||
PY_SED_EXTRACT_EXPORT ?= /\(class\|def\) ..*\# *export/ !d; s/\(class\|def\) *//; s/[(:].*//
|
||||
|
||||
#leftparen:=(
|
||||
#PY_EXPORT ?= $(shell sed '/\(class\|def\) ..*\# *export/ !d; s/\(class\|def\) *//; s/[$(leftparen):].*//' $(PY_SRC_PY))
|
||||
|
||||
all: $(PY_PYC)
|
||||
install: install-dirs.done install-reg.done
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue