[Scons-users] using scons api without invoking main "scons" executable

Brady Johnson bradyallenjohnson at gmail.com
Sun Jun 2 05:28:05 EDT 2013


This sounds like an excellent idea. I would be interested in using this if
you wouldnt mind sharing.

Brady
On Jun 2, 2013 12:07 AM, "Karl Ostmo" <kostmo at gmail.com> wrote:


> Could the installed SCons Python modules be used to query a dependency

> tree programmatically, without executing the main "scons" program?

>

> I started with a script like this:

>

> >>>>> BEGIN SCRIPT

> import sys, os

> sys.path.append( os.path.expanduser("~/Downloads/scons-2.1.0/engine") )

>

> import SCons.Node.FS

> import SCons.Script.SConscript

>

> fs = SCons.Node.FS.get_default_fs()

> toplevel_script_filename = "SConstruct"

> SCons.Script.SConscript.SConscript(fs, toplevel_script_filename)

> <<<<< END SCRIPT

>

> The above snippet produces this error:

> AttributeError: 'DefaultEnvironmentCall' object has no attribute

> 'SConscript'

>

> My goal is to write a frontend to display which files in our

> repository are in use as dependencies vs. cruft.

> _______________________________________________

> Scons-users mailing list

> Scons-users at scons.org

> http://four.pairlist.net/mailman/listinfo/scons-users

>

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


More information about the Scons-users mailing list