py-mod.mk: Extract symbols of a module's __all__ list marked with "# export" #23
1 changed files with 4 additions and 1 deletions
|
|
@ -4,7 +4,10 @@ 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\)\s\+[a-zA-Z_].*\|^ *\S\+\s*=.*\)\# *export/ !d; /^\s*\#/ d; s/\(async\)* *\(class\|def\) *//; s/[(:=].*//
|
PY_SED_EXTRACT_EXPORT_DEF := /\(\(class\|def\)\s\+[a-zA-Z_].*\|^ *\S\+\s*=.*\|^\s\+\"\S\+\",\)\s*\#\s*export/!d;
|
||||||
|
PY_SED_EXTRACT_EXPORT_DEF := $(PY_SED_EXTRACT_EXPORT_DEF) /^\s*\#/ d; s/\(async\)*\s*\(class\|def\)\s*//;
|
||||||
|
PY_SED_EXTRACT_EXPORT_DEF := $(PY_SED_EXTRACT_EXPORT_DEF) s/[(:=].*//; s/^\s\+\"\(\S\+\)\",.*/\1/
|
||||||
|
PY_SED_EXTRACT_EXPORT ?= $(PY_SED_EXTRACT_EXPORT_DEF)
|
||||||
PY_INIT_FILTER ?= cat
|
PY_INIT_FILTER ?= cat
|
||||||
PY_GENERATE_INIT_PY ?= /bin/bash $(JWB_SCRIPT_DIR)/python-tools.sh create-init -m . -e "$(PY_SED_EXTRACT_EXPORT)"
|
PY_GENERATE_INIT_PY ?= /bin/bash $(JWB_SCRIPT_DIR)/python-tools.sh create-init -m . -e "$(PY_SED_EXTRACT_EXPORT)"
|
||||||
ifneq ($(PY_SYMBOL_FILTER),)
|
ifneq ($(PY_SYMBOL_FILTER),)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue