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.
This commit is contained in:
Allen Schober
2026-05-16 12:28:22 +02:00
committed by GitHub
parent e18035a6de
commit 68d21ac2d7
+6
View File
@@ -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()