mirror of
https://github.com/arendst/Tasmota.git
synced 2026-07-27 20:05:46 +00:00
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user