include libs used by builtin_apps in the zips
This commit is contained in:
parent
dfe3eec912
commit
45bd92db14
3 changed files with 12 additions and 1 deletions
7
build.py
7
build.py
|
|
@ -4,6 +4,7 @@ import zipfile
|
||||||
import shutil
|
import shutil
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
import requests
|
import requests
|
||||||
|
from circup.commands import main as circup_cli
|
||||||
|
|
||||||
LEARN_PROJECT_URLS = [
|
LEARN_PROJECT_URLS = [
|
||||||
"https://cdn-learn.adafruit.com/downloads/zip/3194974/Metro/Metro_RP2350_Snake.zip?timestamp={}",
|
"https://cdn-learn.adafruit.com/downloads/zip/3194974/Metro/Metro_RP2350_Snake.zip?timestamp={}",
|
||||||
|
|
@ -102,7 +103,11 @@ def create_font_specific_zip(font_path: Path, src_dir: Path, learn_projects_dir:
|
||||||
|
|
||||||
# copy builtin apps
|
# copy builtin apps
|
||||||
shutil.copytree("builtin_apps", apps_dir, dirs_exist_ok=True)
|
shutil.copytree("builtin_apps", apps_dir, dirs_exist_ok=True)
|
||||||
|
shutil.copyfile("mock_boot_out.txt", temp_dir / "boot_out.txt")
|
||||||
|
for builtin_app_dir in os.listdir("builtin_apps"):
|
||||||
|
circup_cli(["--path", temp_dir, "install", "--auto", "--auto-file", f"apps/{builtin_app_dir}/code.py"],
|
||||||
|
standalone_mode=False)
|
||||||
|
os.remove(temp_dir / "boot_out.txt")
|
||||||
# Create the final zip file
|
# Create the final zip file
|
||||||
with zipfile.ZipFile(output_zip, 'w', zipfile.ZIP_DEFLATED) as zf:
|
with zipfile.ZipFile(output_zip, 'w', zipfile.ZIP_DEFLATED) as zf:
|
||||||
for file_path in temp_dir.rglob("*"):
|
for file_path in temp_dir.rglob("*"):
|
||||||
|
|
|
||||||
4
mock_boot_out.txt
Normal file
4
mock_boot_out.txt
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
Adafruit CircuitPython 10.0.0-alpha.4-2-g01da5c7c88-dirty on 2025-05-07; Adafruit Fruit Jam with rp2350b
|
||||||
|
Board ID:adafruit_fruit_jam
|
||||||
|
UID:
|
||||||
|
boot.py output:
|
||||||
2
requirements.txt
Normal file
2
requirements.txt
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
circup
|
||||||
|
requests
|
||||||
Loading…
Reference in a new issue