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

Gary Oberbrunner garyo at oberbrunner.com
Tue Jul 31 09:00:53 EDT 2012


On Mon, Jul 30, 2012 at 6:49 PM, John Galbraith <jgalb at lanl.gov> wrote:

> ...One argument, specifying the slice, would reduce the number of builders required to one


This is exactly what construction-variable overrides are for.

png19 = env.MakeGraph(tgt, sources, SLICE=19)

Then in your python action, just look at env['SLICE'].

You're not abusing SCons at all, the above is perfectly normal. (But
as Dmitry says, you may care about regenerating png19 if you change
the slice, in which case you could use a Value node, or even have an
emitter that adds a dependency on an internal Value node.)

--
Gary


More information about the Scons-users mailing list