py-mod.mk: Support PY_INIT_SUBMODULES
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 3m3s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 3m12s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 3m2s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 3m21s
CI / Packaging test (push) Successful in 0s
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 3m3s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 3m12s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 3m2s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 3m21s
CI / Packaging test (push) Successful in 0s
Add support for PY_INIT_SUBMODULES to py-mod.mk. If it is defined in a Makefile including py-mod.mk, the listed submodules will be added to __init__.py and thus included in the list of things that can be imported from a module.
This commit also adds support for --submodules to python-tools.sh for that to happen.
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
8f1154892f
commit
d42040cb7b
2 changed files with 18 additions and 1 deletions
|
|
@ -14,6 +14,11 @@ ifneq ($(PY_SYMBOL_FILTER),)
|
|||
PY_GENERATE_INIT_PY += --symbol-filter "$(PY_SYMBOL_FILTER)"
|
||||
endif
|
||||
|
||||
PY_INIT_SUBMODULES ?=
|
||||
ifneq ($(PY_INIT_SUBMODULES),)
|
||||
PY_GENERATE_INIT_PY += --submodules "$(PY_INIT_SUBMODULES)"
|
||||
endif
|
||||
|
||||
#leftparen := (
|
||||
#PY_EXPORT ?= $(shell sed '/\(class\|def\) ..*\# *export/ !d; s/\(class\|def\) *//; s/[$(leftparen):].*//' $(PY_SRC_PY))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue