[Scons-users] Questions about tool selection

Andrew C. Morrow andrew.c.morrow at gmail.com
Wed Jun 12 14:02:28 EDT 2013


Thanks Bill -

I guess I really have several issues: one practical, the rest theoretical.
Lets leave the theoretical ones alone for now...

The practical one, as you may have guessed, is how to get sunlink out of
the default tools. Certainly I could exactly enumerate the tools I need.
However, the current Environment setup in this project uses
tools=['default']. I'm very reluctant to change that, because the
application of 'default' causes a large number of changes to the
Environment, and whatever I do to evict sunlink needs to be backported to
at least one stable release. So I'd like to make the removal of sunlink as
surgical as possible and not make any other unknown changes to the
Environment as a result of changing from 'default' to an explicit list. At
least not right now.

One thought that occurred to me overnight was that if I could somehow get a
list of what tools 'default' expanded to before constructing the
Environment, then I could filter sunlink out of that list:

env = Environment(tools=[tool for tool in MagicallyGetWhatDefaultMeans() if
tool not in ['sunlink']] + [my, custom, tool, list])

Any thoughts on how I might do this? It looks like SCons.Tool.tool_list
might be the way to go, but that appears to be an internal API, and to
invoke it I need to know what env['PLATFORM'] evaluates to, but I don't yet
have an Environment. I suppose I could create a dummy Environment, and use
its PLATFORM value to call tool_list. But I'd still be concerned about
invoking the internal API. Any thoughts on this?

Thanks,
Andrew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://four.pairlist.net/pipermail/scons-users/attachments/20130612/d512b73b/attachment.htm


More information about the Scons-users mailing list