I have a configuration function in my wscript:
def configure(ctx):
ctx.env.V1 = 123
def build(ctx):
def myfun(task):
return task.exec_command('echo VAR=${V1}')
ctx.exec_command('echo VAR=${V1}')
ctx.add_post_fun(myfun)
But in build and in myfun (both) V1
is not available (it's substituted to an empty string). I can store and load my own ConfigSet
. I know that V1
is available in rule, but it seems it is not available in exec_command()
.
What is the convenient way to do it? To access my config vars in exec_command()
in build()
body and in pre-/post- commands?