I’m trying to use SCons Command from within an extra_script.
However it appears to have no effort whatsoever on the build process - the build_func is never executed, and the files are not in the tree (as seen by setting SCONSFLAGS=--tree=status
).
I also tried changing projenv to env, and switch form post to pre setting to no effect.
Any ideas what am I doing wrong and how to utilize those “advanced” SCons features from extra_scripts?
extra_script.py
:
def build_func(target, source, env):
print(f">>>> build_func T:{target} S:{source}")
print(">Running extra_script.py")
Import("projenv")
c = projenv.Command('msgs.c', 'msgs.txt', action=build_func)
print(f">Command={c}")