[Scons-users] Selecting a decider for a node

Dirk Bächle tshortik at gmx.de
Tue Aug 20 16:05:29 EDT 2013


Hi Tom,

On 20.08.2013 11:05, Tom Tanner (BLOOMBERG/ LONDON) wrote:

> I'm trying to work out a way of attaching a decider (or something to

> assist making an appropriate decision for a decider) to a node. Having

> multiple environments as suggested in the manual isn't going to work

> very well.

>

> [...]

>

>

> Is there any approach that can be taken to mark a node in some sort of

> flexible way that can be used by a custom decider?

>


each Node has an ".attributes" field, which is of type

class Attrs(object):
pass

. It can be used to append arbitrary information to the node, e.g.

t = d.File(c + class_suffix)
t.attributes.java_classdir = classdir

as taken from ll. 107 of the javac.py Tool.

Another option would be to subclass FS.File, overwrite the decider and
then explicitly create nodes of this new type where needed.

Best regards,

Dirk

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://four.pairlist.net/pipermail/scons-users/attachments/20130820/ef84426a/attachment.html


More information about the Scons-users mailing list