[Scons-users] Builder Arguments: **kwargs?

John Galbraith jgalb at lanl.gov
Mon Jul 30 13:55:04 EDT 2012


I am trying to use scons to keep figures for a paper up to date.
Basically, my source files are hdf5 data, and my targets are images, csv
files, and pdf files (from matplotlib). So every time I generate a new
hdf5 file, I want scons to recreate the figures depending on the data.

So this is working fairly well, actually. But it would be convenient to
pass arguments to my rules in addition to "source" and "target". I
could probably stuff arguments in the Environment, but that sounds
icky. Right now, I am regexing arguments out of the "target" file name,
which is also nasty and fragile. Is there any way to propogate a kwargs
or something like that from the rule to the builder? Like:

env.field(target='ez0', source='fulldomain', **kwargs)

where "field" is a custom builder of my own (it writes an image), and
"env" is the build environment?

John


More information about the Scons-users mailing list