CI: Switch py modules from cmake hacks to manifest.py.
A long overdue fix. Uses board-specific manifest.py files to freeze Python modules, instead of polluting ports/rp2/modules.
This commit is contained in:
parent
8648597134
commit
b30d9ca554
|
@ -0,0 +1,3 @@
|
|||
include("$(PORT_DIR)/boards/manifest.py")
|
||||
|
||||
include("../manifest_pico.py")
|
|
@ -1,2 +1,6 @@
|
|||
# cmake file for Raspberry Pi Pico
|
||||
|
||||
# Board specific version of the frozen manifest
|
||||
set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py)
|
||||
|
||||
set(MICROPY_C_HEAP_SIZE 4096)
|
|
@ -1,3 +1,5 @@
|
|||
include("$(PORT_DIR)/boards/manifest.py")
|
||||
|
||||
require("bundle-networking")
|
||||
require("bundle-networking")
|
||||
|
||||
include("../manifest_picow.py")
|
|
@ -3,3 +3,6 @@ include("$(PORT_DIR)/boards/manifest.py")
|
|||
# https://github.com/micropython/micropython-lib/blob/master/micropython/bundles/bundle-networking/manifest.py
|
||||
require("bundle-networking")
|
||||
require("umqtt.simple")
|
||||
|
||||
freeze("../../modules_py", "pimoroni.py")
|
||||
freeze("../../modules_py", "boot.py")
|
||||
|
|
|
@ -3,4 +3,7 @@ include("$(PORT_DIR)/boards/manifest.py")
|
|||
# https://github.com/micropython/micropython-lib/blob/master/micropython/bundles/bundle-networking/manifest.py
|
||||
require("bundle-networking")
|
||||
require("urllib.urequest")
|
||||
require("umqtt.simple")
|
||||
require("umqtt.simple")
|
||||
|
||||
freeze("../../modules_py", "pimoroni.py")
|
||||
freeze("../../modules_py", "boot.py")
|
|
@ -0,0 +1,3 @@
|
|||
include("$(PORT_DIR)/boards/manifest.py")
|
||||
|
||||
include("../manifest_pico.py")
|
|
@ -1,2 +1,6 @@
|
|||
# cmake file for Pimoroni Pico LiPo 16MB
|
||||
|
||||
# Board specific version of the frozen manifest
|
||||
set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py)
|
||||
|
||||
set(MICROPY_C_HEAP_SIZE 4096)
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
include("$(PORT_DIR)/boards/manifest.py")
|
||||
|
||||
include("../manifest_pico.py")
|
|
@ -1,2 +1,6 @@
|
|||
# cmake file for Pimoroni Pico LiPo 4MB
|
||||
|
||||
# Board specific version of the frozen manifest
|
||||
set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py)
|
||||
|
||||
set(MICROPY_C_HEAP_SIZE 4096)
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
include("$(PORT_DIR)/boards/manifest.py")
|
||||
|
||||
include("../manifest_pico.py")
|
|
@ -1,2 +1,6 @@
|
|||
# cmake file for Pimoroni Tiny 2040
|
||||
|
||||
# Board specific version of the frozen manifest
|
||||
set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py)
|
||||
|
||||
set(MICROPY_C_HEAP_SIZE 4096)
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
include("$(PORT_DIR)/boards/manifest.py")
|
||||
|
||||
freeze("../../modules_py", "pimoroni.py")
|
||||
freeze("../../modules_py", "boot.py")
|
|
@ -4,4 +4,7 @@ set(PICO_BOARD "pimoroni_tufty2040")
|
|||
# Allow Pico SDK to locate "pimoroni_tufty2040.h" in this directory.
|
||||
list(APPEND PICO_BOARD_HEADER_DIRS "${CMAKE_CURRENT_LIST_DIR}")
|
||||
|
||||
# Board specific version of the frozen manifest
|
||||
set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py)
|
||||
|
||||
set(MICROPY_C_HEAP_SIZE 4096)
|
|
@ -0,0 +1,5 @@
|
|||
freeze("../modules_py", "gfx_pack.py")
|
||||
freeze("../modules_py", "interstate75.py")
|
||||
|
||||
freeze("../modules_py", "pimoroni.py")
|
||||
freeze("../modules_py", "boot.py")
|
|
@ -0,0 +1,7 @@
|
|||
freeze("../modules_py", "gfx_pack.py")
|
||||
freeze("../modules_py", "interstate75.py")
|
||||
freeze("../modules_py", "automation.py")
|
||||
freeze("../modules_py", "inventor.py")
|
||||
|
||||
freeze("../modules_py", "pimoroni.py")
|
||||
freeze("../modules_py", "boot.py")
|
|
@ -41,12 +41,12 @@ endif()
|
|||
include(modules_py/modules_py)
|
||||
|
||||
# Most board specific ports wont need all of these
|
||||
copy_module(gfx_pack.py)
|
||||
copy_module(interstate75.py)
|
||||
if(PICO_BOARD STREQUAL "pico_w")
|
||||
copy_module(automation.py)
|
||||
copy_module(inventor.py)
|
||||
endif()
|
||||
# copy_module(gfx_pack.py)
|
||||
# copy_module(interstate75.py)
|
||||
# if(PICO_BOARD STREQUAL "pico_w")
|
||||
# copy_module(automation.py)
|
||||
# copy_module(inventor.py)
|
||||
# endif()
|
||||
|
||||
# Must call `enable_ulab()` to enable
|
||||
include(micropython-common-ulab)
|
|
@ -33,5 +33,5 @@ target_link_libraries(usermod INTERFACE usermod_modules_py)
|
|||
genversion(version.py)
|
||||
|
||||
# .py files to copy from modules_py to ports/rp2/modules
|
||||
copy_module(pimoroni.py)
|
||||
copy_module(boot.py)
|
||||
# copy_module(pimoroni.py)
|
||||
# copy_module(boot.py)
|
||||
|
|
Loading…
Reference in New Issue