Package SCons :: Module Environment :: Class BuilderWrapper
[hide private]
[frames] | no frames]

Class BuilderWrapper

source code

MethodWrapper --+

A MethodWrapper subclass that that associates an environment with a Builder.

This mainly exists to wrap the __call__() function so that all calls to Builders can have their argument lists massaged in the same way (treat a lone argument as the source, treat two arguments as target then source, make sure both target and source are lists) without having to have cut-and-paste code to do it.

As a bit of obsessive backwards compatibility, we also intercept attempts to get or set the "env" or "builder" attributes, which were the names we used before we put the common functionality into the MethodWrapper base class. We'll keep this around for a while in case people shipped Tool modules that reached into the wrapper (like the Tool/ module does, or did). There shouldn't be a lot attribute fetching or setting on these, so a little extra work shouldn't hurt.

Instance Methods [hide private]
__call__(self, target=None, source=<class SCons.Environment._Null at 0x25f0770>, *args, **kw) source code
__repr__(self) source code
__str__(self) source code
__getattr__(self, name) source code
__setattr__(self, name, value) source code

Inherited from MethodWrapper: __init__, clone

Method Details [hide private]

__call__(self, target=None, source=<class SCons.Environment._Null at 0x25f0770>, *args, **kw)
(Call operator)

source code 
Overrides: MethodWrapper.__call__