Skip to content

Commit 45bd92d

Browse files
committed
include libs used by builtin_apps in the zips
1 parent dfe3eec commit 45bd92d

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

build.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import shutil
55
from pathlib import Path
66
import requests
7+
from circup.commands import main as circup_cli
78

89
LEARN_PROJECT_URLS = [
910
"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:
102103

103104
# copy builtin apps
104105
shutil.copytree("builtin_apps", apps_dir, dirs_exist_ok=True)
105-
106+
shutil.copyfile("mock_boot_out.txt", temp_dir / "boot_out.txt")
107+
for builtin_app_dir in os.listdir("builtin_apps"):
108+
circup_cli(["--path", temp_dir, "install", "--auto", "--auto-file", f"apps/{builtin_app_dir}/code.py"],
109+
standalone_mode=False)
110+
os.remove(temp_dir / "boot_out.txt")
106111
# Create the final zip file
107112
with zipfile.ZipFile(output_zip, 'w', zipfile.ZIP_DEFLATED) as zf:
108113
for file_path in temp_dir.rglob("*"):

mock_boot_out.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Adafruit CircuitPython 10.0.0-alpha.4-2-g01da5c7c88-dirty on 2025-05-07; Adafruit Fruit Jam with rp2350b
2+
Board ID:adafruit_fruit_jam
3+
UID:
4+
boot.py output:

requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
circup
2+
requests

0 commit comments

Comments
 (0)