[Scons-users] Multiple Configure objects

Dirk Bächle tshortik at gmx.de
Sat Sep 13 04:16:52 EDT 2014


Hi Bryan,

On 13.09.2014 02:18, Bryan Catanzaro wrote:
> Hi -
> I like SCons' Configure functionality. I would like to create multiple
> Configure objects within the same project - for example, one in the
> main SConstruct file, and then another working on a clone of the main
> env, but with some other things added in a child SConscript.
>
> Unfortunately, if you try to create two configure objects, SCons
> throws a blank UserError.
> This can be easily reproduced with this code:
>
> conf = Configure(env)
> clone = env.Clone()
> clone_conf = Configure(clone)
>
> A couple things:
> 1. Is it possible to do this in some other way?

this should be possible if you close/finish the first configuration 
context before opening another one:

env = Environment()
cenv = Configure(env)
clone = env.Clone()
cenv.Finish()
clone_conf = Configure(clone)

Depending on your project's requirements you might want to clone the 
Environment() before or after the first Configuration step.

> 2. If not, can a more informative error message be thrown? On 2.3.3,
> the error message is blank, so the output is literally just:
>
> scons: ***
>
> I had to debug SCons to figure out what was going on...

I agree that the error message should be a little more...verbose, ahem. 
Could you please create an issue in our Tigris bug tracker for this, and 
append your testcase? Then we could try to catch this case where a 
Configure context is already openend and emit a more meaningful warning 
message.

Thanks a lot in advance, and best regards,

Dirk



More information about the Scons-users mailing list