mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 12:03:31 +01:00
py-mod.mk: Add support to async function definitions
The async keyword confused python-tools.sh, this commit fixes that. Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
9f0276ead5
commit
35def547bf
1 changed files with 3 additions and 2 deletions
|
|
@ -4,7 +4,7 @@ include $(JWBDIR)/make/dirs.mk
|
||||||
include $(JWBDIR)/make/dev-utils.mk
|
include $(JWBDIR)/make/dev-utils.mk
|
||||||
|
|
||||||
PY_INIT_TMPL = $(wildcard __init__.py.tmpl)
|
PY_INIT_TMPL = $(wildcard __init__.py.tmpl)
|
||||||
PY_SED_EXTRACT_EXPORT ?= /\(class\|def\) ..*\# *export/ !d; s/\(class\|def\) *//; s/[(:].*//
|
PY_SED_EXTRACT_EXPORT ?= /\(class\|def\) ..*\# *export/ !d; s/\(async\)* *\(class\|def\) *//; s/[(:].*//
|
||||||
|
|
||||||
#leftparen := (
|
#leftparen := (
|
||||||
#PY_EXPORT ?= $(shell sed '/\(class\|def\) ..*\# *export/ !d; s/\(class\|def\) *//; s/[$(leftparen):].*//' $(PY_SRC_PY))
|
#PY_EXPORT ?= $(shell sed '/\(class\|def\) ..*\# *export/ !d; s/\(class\|def\) *//; s/[$(leftparen):].*//' $(PY_SRC_PY))
|
||||||
|
|
@ -18,5 +18,6 @@ include $(JWBDIR)/make/py-rules.mk
|
||||||
|
|
||||||
__init__.py: $(PY_INIT_TMPL) $(filter-out __init__.py,$(PY_SRC_PY))
|
__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
|
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)" *.py | tee -a $@.tmp
|
/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) | tee -a $@.tmp
|
||||||
mv $@.tmp $@
|
mv $@.tmp $@
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue