I have a single SConscript file in a top level directory and I have many subdirectories with JSON files containing different key/value pair. I have one env.Command() in my SConscript file that I want to be called based on the value of a particular key. What is the best way to do this in Scons?
I was thinking something like:
env.Command(
test = Value(params['json_key'])
if test == "True":
target = out.txt,
source = in.txt,
action = 'function $SOURCE $TARGET'
else:
pass
)
This is Python, you cannot put an if/else inside something else like that. However, you can pass arguments to
env.Commandusing a dictionary.