method for calling SCons as a library?

Daniel Holth <[email protected]>
Newsgroups gmane.comp.programming.tools.scons.devel
Message-ID <CAG8k2+62=UVZJy-J4Dtbc=FVAp=ayO6hyNb6d=S0_769r3wppA@mail.gmail.com>
My SCons-powerd Python packaging tool needs to report the name of the file
it built from an API. Here's the method I've come up with. Is there a
better way to figure out what was actually built?

0. Update sys.argv[] to pass desired arguments to SCons
1. Call SCons.Script.Main.main()
2. Catch SystemExit
3. Examine SCons.Script.DEFAULT_TARGETS
4. return interesting target name
5. Exit Python

Thanks.

_______________________________________________
Scons-dev mailing list
[email protected]
https://pairlist2.pair.net/mailman/listinfo/scons-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.