Base class for different flavors of construction environments.
This class contains a minimal set of methods that handle contruction
variable expansion and conversion of strings to Nodes, which may or
may not be actually useful as a stand-alone class. Which methods
ended up in this class is pretty arbitrary right now. They're
basically the ones which we've empirically determined are common to
the different construction environment subclasses, and most of the
others that use or touch the underlying dictionary of construction
variables.
Eventually, this class should contain all the methods that we
determine are necessary for a "minimal" interface to the build engine.
A full "native Python" SCons environment has gotten pretty heavyweight
with all of the methods and Tools and construction variables we've
jammed in there, so it would be nice to have a lighter weight
alternative for interfaces that don't need all of the bells and
whistles. (At some point, we'll also probably rename this class
"Base," since that more reflects what we want this class to become,
but because we've released comments that tell people to subclass
Environment.Base to create their own flavors of construction
environment, we'll save that for a future refactoring when this
class actually becomes useful.)
|
__init__(self,
**kw)
Initialization of an underlying SubstitutionEnvironment class. |
source code
|
|
|
_init_special(self)
Initial the dispatch tables for special handling of
special construction variables. |
source code
|
|
|
|
|
|
|
|
|
|
|
get(self,
key,
default=None)
Emulates the get() method of dictionaries. |
source code
|
|
|
|
|
|
|
|
|
arg2nodes(self,
args,
node_factory=<class SCons.Environment._Null at 0x25f0770>,
lookup_list=<class SCons.Environment._Null at 0x25f0770>,
**kw) |
source code
|
|
|
|
|
|
|
subst(self,
string,
raw=0,
target=None,
source=None,
conv=None,
executor=None)
Recursively interpolates construction variables from the
Environment into the specified string, returning the expanded
result. |
source code
|
|
|
subst_kw(self,
kw,
raw=0,
target=None,
source=None) |
source code
|
|
|
subst_list(self,
string,
raw=0,
target=None,
source=None,
conv=None,
executor=None)
Calls through to SCons.Subst.scons_subst_list(). |
source code
|
|
|
subst_path(self,
path,
target=None,
source=None)
Substitute a path list, turning EntryProxies into Nodes
and leaving Nodes (and other objects) as-is. |
source code
|
|
|
subst_target_source(self,
string,
raw=0,
target=None,
source=None,
conv=None,
executor=None)
Recursively interpolates construction variables from the
Environment into the specified string, returning the expanded
result. |
source code
|
|
|
|
|
AddMethod(self,
function,
name=None)
Adds the specified function as a method of this construction
environment with the specified name. |
source code
|
|
|
RemoveMethod(self,
function)
Removes the specified function's MethodWrapper from the
added_methods list, so we don't re-bind it when making a clone. |
source code
|
|
|
Override(self,
overrides)
Produce a modified environment whose variables are overriden by
the overrides dictionaries. |
source code
|
|
|
ParseFlags(self,
*flags)
Parse the set of flags and return a dict with the flags placed
in the appropriate entry. |
source code
|
|
|
MergeFlags(self,
args,
unique=1,
dict=None)
Merge the dict in args into the construction variables of this
env, or the passed-in dict. |
source code
|
|