From 68d21ac2d7d811e0f7d90d0028092d9bd08bc272 Mon Sep 17 00:00:00 2001 From: Allen Schober Date: Sat, 16 May 2026 06:28:22 -0400 Subject: [PATCH] Create tasmota_defines_for_berry.be stub before solidification if absent (#24749) - solidify_all_python.be imports tasmota_defines during solidification, but the actual file is generated post-compilation by gen-berry-defines.py. If it doesn't exist yet, solidification fails. Create an empty stub before calling prepareBerryFiles so the import succeeds regardless of build order. --- pio-tools/solidify-from-url.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pio-tools/solidify-from-url.py b/pio-tools/solidify-from-url.py index 903e83cdd..cda0a56c0 100644 --- a/pio-tools/solidify-from-url.py +++ b/pio-tools/solidify-from-url.py @@ -142,6 +142,12 @@ else: if env.IsCleanTarget() == False: os.chdir(BERRY_SOLIDIFY_DIR) + # tasmota_defines_for_berry.be is generated post-compilation; create an empty + # stub if it doesn't exist yet so solidify_all_python.be can import it safely. + defines_file = join(env.subst("$PROJECT_DIR"), "tasmota", "tasmota_defines_for_berry.be") + if not os.path.exists(defines_file): + open(defines_file, 'w').close() + if prepareBerryFiles(files.splitlines()): BERRY_GEN_DIR = join(env.subst("$PROJECT_DIR"), "lib", "libesp32", "berry") solidify_env = os.environ.copy()