mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 03:53:32 +01:00
py-defs.mk, py-mod.mk: Support PY_UPDATE_INIT_PY
Allow to disable auto-updating of __init__.py in a directory via PY_UPDATE_INIT_PY = true | false. Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
2a67708fb1
commit
d0c1eac1a9
2 changed files with 3 additions and 0 deletions
|
|
@ -17,8 +17,10 @@ distclean:
|
|||
|
||||
include $(JWBDIR)/make/py-rules.mk
|
||||
|
||||
ifeq ($(PY_UPDATE_INIT_PY),true)
|
||||
__init__.py: $(PY_INIT_TMPL) $(filter-out __init__.py,$(PY_SRC_PY))
|
||||
if [ "$(PY_INIT_TMPL)" ]; then cat "$(PY_INIT_TMPL)" > $@.tmp; else > $@.tmp; fi
|
||||
/bin/bash +H $(JWB_SCRIPT_DIR)/python-tools.sh create-init -m $(PY_MOD) -e "$(PY_SED_EXTRACT_EXPORT)" \
|
||||
$(filter-out __init__.py,$(PY_ALL_PY)) $(SUBDIRS_TO_ITERATE) | $(PY_INIT_FILTER) | tee -a $@.tmp
|
||||
mv $@.tmp $@
|
||||
endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue