mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-19 04:28:28 +00:00
interpreters/python: add wrapper to initialize Python
This wrapper application checks if the Python's modules are already mounted (and mounts them, if not), sets the necessary environment variables and, then, runs the Python interpreter.
This commit is contained in:
parent
4c6a6c7b16
commit
87f4eb8021
4 changed files with 116 additions and 38 deletions
|
|
@ -82,6 +82,7 @@ $(CPYTHON_UNPACKNAME): $(CPYTHON_ZIP)
|
|||
$(Q) patch -p1 -d $(CPYTHON_UNPACKNAME) < patch$(DELIM)0010-check-for-the-d_ino-member-of-the-structure-dirent.patch
|
||||
$(Q) patch -p1 -d $(CPYTHON_UNPACKNAME) < patch$(DELIM)0011-avoid-redefinition-warning-if-UNUSED-is-already-defi.patch
|
||||
$(Q) patch -p1 -d $(CPYTHON_UNPACKNAME) < patch$(DELIM)0012-hack-place-_PyRuntime-structure-into-PSRAM-bss-regio.patch
|
||||
$(Q) patch -p1 -d $(CPYTHON_UNPACKNAME) < patch$(DELIM)0013-transform-functions-used-by-NuttX-to-lowercase.patch
|
||||
|
||||
$(HOSTPYTHON):
|
||||
mkdir -p $(HOSTBUILD)
|
||||
|
|
@ -175,13 +176,7 @@ PROGNAME += $(CONFIG_INTERPRETER_CPYTHON_PROGNAME)
|
|||
PRIORITY += $(CONFIG_INTERPRETER_CPYTHON_PRIORITY)
|
||||
STACKSIZE += $(CONFIG_INTERPRETER_CPYTHON_STACKSIZE)
|
||||
|
||||
MAINSRC += python.c
|
||||
|
||||
PROGNAME += $(CONFIG_INTERPRETER_CPYTHON_MOUNT_MODULES_PROGNAME)
|
||||
PRIORITY += $(CONFIG_INTERPRETER_CPYTHON_MOUNT_MODULES_PRIORITY)
|
||||
STACKSIZE += $(CONFIG_INTERPRETER_CPYTHON_MOUNT_MODULES_STACKSIZE)
|
||||
|
||||
MAINSRC += mount_modules.c
|
||||
MAINSRC += python_wrapper.c
|
||||
|
||||
checkgenromfs:
|
||||
@genromfs -h 1>/dev/null 2>&1 || { \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue