[Scons-users] Replace env['BUILDERS']['Program'] and	env.Configure
    William Deegan 
    bill at baddogconsulting.com
       
    Thu Aug 23 14:09:38 EDT 2012
    
    
  
Luc,
On Aug 22, 2012, at 3:06 PM, Luc Bourhis <luc_j_bourhis at mac.com> wrote:
> Hi,
> 
> I am using what seemed a classic trick:
> 
> def _(env, target, source, **args):
>  env = env.Clone()
>  # do something to env
>  return env.OriginalProgram(target, source, **args)
> env['BUILDERS']['OriginalProgram'] = env['BUILDERS']['Program']
> env['BUILDERS']['Program'] = _
> 
> However, this crashes env.TryBuild:
> 
> File "/Users/luc/Developer/cctbx/scons/src/engine/SCons/SConf.py", line 546, in TryBuild
>  pref = self.env.subst( builder.builder.prefix )
> 
> Here builder.builder is that function "_" of mine, which does not have an attribute "prefix" of course.
> 
> That's with SCons 2.2.0.
> 
> How would I go to work that problem around?
Why would you want to do something like this?
You could use a pseudo-builder or pass ENV vars to the Program() would seem to be much more straightforward.
-Bill
    
    
More information about the Scons-users
mailing list