Skip to content

Commit ccc4e8d

Browse files
committed
LU debug
1 parent 28b7789 commit ccc4e8d

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

pio-scripts/load_usermods.py

+5-6
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,15 @@ def find_usermod(mod: str):
3030
src_dir = src_dir.replace('\\','/')
3131
mod_paths = {mod: find_usermod(mod) for mod in usermods.split(" ")}
3232
usermods = [f"{mod} = symlink://{path}" for mod, path in mod_paths.items()]
33-
print(deps)
3433
proj.set("env:" + env['PIOENV'], 'lib_deps', deps + usermods)
35-
print(env.GetProjectOption('lib_deps'))
3634

3735

3836
# Monkey-patch ConfigureProjectLibBuilder to mark up the dependencies
3937
# Save the old value
40-
cpl = env.ConfigureProjectLibBuilder
38+
cplb = env.ConfigureProjectLibBuilder
4139
# Our new wrapper
42-
def cpl_wrapper(xenv):
40+
def cplb_wrapper(xenv):
41+
wrapper_result = cplb.clone(xenv)()
4342
# Update usermod properties
4443
lib_builders = xenv.GetLibBuilders()
4544
wled_dir = xenv["PROJECT_SRC_DIR"]
@@ -63,8 +62,8 @@ def cpl_wrapper(xenv):
6362
build = um._manifest.get("build", {})
6463
build["libArchive"] = False
6564
um._manifest["build"] = build
66-
return cpl.clone(xenv)()
65+
return wrapper_result
6766

6867

6968
# Replace the old one with ours
70-
env.AddMethod(cpl_wrapper, "ConfigureProjectLibBuilder")
69+
env.AddMethod(cplb_wrapper, "ConfigureProjectLibBuilder")

0 commit comments

Comments
 (0)