From 802b7c7aee3e5f205dbbbfbfba95e2b65550759d Mon Sep 17 00:00:00 2001 From: s-hadinger <49731213+s-hadinger@users.noreply.github.com> Date: Tue, 21 Apr 2026 16:08:28 +0200 Subject: [PATCH] Berry solidification is now part of the build system (#24664) * Berry solidification if now part of the build system * Force Python in UTF-8 on Windows --- CHANGELOG.md | 1 + pio-tools/gen-berry-structures.py | 96 ++++++++++++++++++++++++++++++- pio-tools/solidify-from-url.py | 2 +- 3 files changed, 96 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b896f599..819c69889 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ All notable changes to this project will be documented in this file. ## [15.3.0.4] ### Added +- Berry solidification is now part of the build system ### Breaking Changed diff --git a/pio-tools/gen-berry-structures.py b/pio-tools/gen-berry-structures.py index c59360b13..766887752 100644 --- a/pio-tools/gen-berry-structures.py +++ b/pio-tools/gen-berry-structures.py @@ -3,11 +3,103 @@ Import("env") import os import glob import subprocess -from os.path import join +from os.path import join, isfile # generate all precompiled Berry structures from multiple modules CURRENT_DIR = os.getcwd() -BERRY_GEN_DIR = join(env.subst("$PROJECT_DIR"), "lib", "libesp32","berry") +PROJECT_DIR = env.subst("$PROJECT_DIR") +BERRY_GEN_DIR = join(PROJECT_DIR, "lib", "libesp32", "berry") +BERRY_PORT_DIR = BERRY_GEN_DIR # PYTHONPATH root for `berry_port` module + +# --------------------------------------------------------------------------- +# Step 1 - run all `solidify_all_python.be` scripts in pure Python +# +# Each script has a shebang of the form: +# #!/usr/bin/env -S PYTHONPATH=/berry python3 -m berry_port -s -g +# We replicate this here by invoking `python3 -m berry_port -s -g