[Scons-users] Callable Python

Russell, J.J. russell at slac.stanford.edu
Thu Aug 14 19:47:09 EDT 2014


Message: 2
Date: Thu, 14 Aug 2014 08:52:23 -0700
From: William Roberts <bill.c.roberts at gmail.com>
To: scons-users <scons-users at scons.org>
Subject: Re: [Scons-users] Callable SCons
Message-ID:
	<CAFftDdqVqGAWiGRkCobRpN-gpJKvMY3=d938aiNVMm2AfECpxQ at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Do you mean with something like pythons Popen() module?
On Aug 14, 2014 8:44 AM, "Russell, J.J." <russell at slac.stanford.edu> wrote:

> For various reasons we would like to call SCons, not from the shell's 
> command line, but from within another python program.  Is this possible?
>
> Jim Russell
>

No, using Popen is not a solution.

What we have is a python based program that does, among other things, some code management and some building.  Without going into details, the code management side builds up a lot of context that it would like to pass on to SCons.  This context is all nicely contained within python data structures and classes that we would like to 'hand' to SCons in order to direct the build. 

The basic requirement would be to stay within this python program.  (It is not practical to do it the other way around, i.e. have SCons execute our script.  It is a question of who is on top.)

Jim Russell

Dr. James J. Russell
Stanford Linear Accelerator Center
650-926-2583
russell at slac.stanford.edu



More information about the Scons-users mailing list