| Home | Trees | Index | Help |
|
|---|
| Package SCons :: Module Environment :: Class Base |
|
SubstitutionEnvironment --+
|
Base
OverrideEnvironment,
SConsEnvironmentBase class for "real" construction Environments. These are the primary objects used to communicate dependency and construction information to the build engine.
Keyword arguments supplied when the construction Environment is created are construction variables used to initialize the Environment.
| Method Summary | |
|---|---|
Initialization of a basic SCons construction environment, including setting up special construction variables like BUILDER, PLATFORM, etc., and searching for and applying available Tools. | |
Action(self,
*args,
**kw)
| |
AddPostAction(self,
files,
action)
| |
AddPreAction(self,
files,
action)
| |
Alias(self,
target,
source,
action,
**kw)
| |
AlwaysBuild(self,
*targets)
| |
Append values to existing construction variables in an Environment. | |
Append path elements to the path 'name' in the 'ENV' dictionary for this environment. | |
Append values to existing construction variables in an Environment, if they're not already there. | |
BuildDir(self,
build_dir,
src_dir,
duplicate)
| |
Builder(self,
**kw)
| |
CacheDir(self,
path)
| |
Clean(self,
targets,
files)
| |
Return a copy of a construction Environment. | |
Builds the supplied target files from the supplied source files using the supplied action. | |
Configure(self,
*args,
**kw)
| |
Copy(self,
*args,
**kw)
| |
Decider(self,
function)
| |
Explicity specify that 'target's depend on 'dependency'. | |
Return the first available program in progs. | |
Dictionary(self,
*args)
| |
Dir(self,
name,
*args,
**kw)
| |
Using the standard Python pretty printer, dump the contents of the scons build environment to stdout. | |
Entry(self,
name,
*args,
**kw)
| |
Environment(self,
**kw)
| |
Directly execute an action through an Environment | |
File(self,
name,
*args,
**kw)
| |
FindFile(self,
file,
dirs)
| |
returns the list of all targets of the Install and InstallAs Builder. | |
Search a list of paths for something that matches the prefix and suffix. | |
returns a list of all source files. | |
Flatten(self,
sequence)
| |
Fetch the builder with the specified name from the environment. | |
get_CacheDir(self)
| |
Return a factory function for creating Nodes for this construction environment. | |
Find the appropriate scanner given a key (usually a file suffix). | |
get_src_sig_type(self)
| |
get_tgt_sig_type(self)
| |
GetBuildPath(self,
files)
| |
Glob(self,
pattern,
ondisk,
source,
strings)
| |
Ignore a dependency. | |
Literal(self,
string)
| |
Local(self,
*targets)
| |
Tags a target so that it will not be cached | |
Tags a target so that it will not be cleaned by -c | |
Use the specified function to parse the output of the command in order to modify the current environment. | |
Parse a mkdep-style file for explicit dependencies. | |
Platform(self,
platform)
| |
Precious(self,
*targets)
| |
Prepend values to existing construction variables in an Environment. | |
Prepend path elements to the path 'name' in the 'ENV' dictionary for this environment. | |
Append values to existing construction variables in an Environment, if they're not already there. | |
Replace existing construction variables in an Environment with new construction variables and/or values. | |
Replace old_prefix with new_prefix and old_suffix with new_suffix. | |
Repository(self,
*dirs,
**kw)
| |
Specify that 'prerequisite' must be built before 'target', (but 'target' does not actually depend on 'prerequisite' and need not be rebuilt if it changes). | |
Scanner(self,
*args,
**kw)
| |
Delete the cached scanner map (if we need to). | |
SConsignFile(self,
name,
dbm_module)
| |
SetDefault(self,
**kw)
| |
Tell scons that side_effects are built as side effects of building targets. | |
Arrange for a source code builder for (part of) a tree. | |
SourceSignatures(self,
type)
| |
This function converts a string or list into a list of strings or Nodes. | |
TargetSignatures(self,
type)
| |
Tool(self,
tool,
toolpath,
**kw)
| |
Value(self,
value,
built_value)
| |
Find prog in the path. | |
| Inherited from SubstitutionEnvironment | |
| |
| |
| |
| |
Adds the specified function as a method of this construction environment with the specified name. | |
| |
| |
Emulates the get() method of dictionaries. | |
| |
| |
| |
| |
Merge the dict in args into the construction variables. | |
Produce a modified environment whose variables are overriden by the overrides dictionaries. | |
Parse the set of flags and return a dict with the flags placed in the appropriate entry. | |
Removes the specified function's MethodWrapper from the added_methods list, so we don't re-bind it when making a clone. | |
Recursively interpolates construction variables from the Environment into the specified string, returning the expanded result. | |
| |
Calls through to SCons.Subst.scons_subst_list(). | |
Substitute a path list, turning EntryProxies into Nodes and leaving Nodes (and other objects) as-is. | |
Recursively interpolates construction variables from the Environment into the specified string, returning the expanded result. | |
| Class Variable Summary | |
|---|---|
list |
memoizer_counters = [<SCons.Memoize.CountValue instance ...
|
| Method Details |
|---|
__init__(self,
platform=None,
tools=None,
toolpath=None,
options=None,
**kw)
|
Append(self, **kw)Append values to existing construction variables in an Environment. |
AppendENVPath(self, name, newpath, envname='ENV', sep=':')Append path elements to the path 'name' in the 'ENV' dictionary for this environment. Will only add any particular path once, and will normpath and normcase all paths to help assure this. This can also handle the case where the env variable is a list instead of a string. |
AppendUnique(self, **kw)Append values to existing construction variables in an Environment, if they're not already there. |
Clone(self, tools=[], toolpath=None, **kw)Return a copy of a construction Environment. The copy is like a Python "deep copy"--that is, independent copies are made recursively of each objects--except that a reference is copied when an object is not deep-copyable (like a function). There are no references to any mutable objects in the original Environment. |
Command(self, target, source, action, **kw)Builds the supplied target files from the supplied source files using the supplied action. Action may be any type that the Builder constructor will accept for an action. |
Depends(self, target, dependency)Explicity specify that 'target's depend on 'dependency'. |
Detect(self, progs)Return the first available program in progs. |
Dump(self, key=None)Using the standard Python pretty printer, dump the contents of the scons build environment to stdout. If the key passed in is anything other than None, then that will be used as an index into the build environment dictionary and whatever is found there will be fed into the pretty printer. Note that this key is case sensitive. |
Execute(self, action, *args, **kw)Directly execute an action through an Environment |
FindInstalledFiles(self)returns the list of all targets of the Install and InstallAs Builder. |
FindIxes(self, paths, prefix, suffix)Search a list of paths for something that matches the prefix and suffix. paths - the list of paths or nodes. prefix - construction variable for the prefix. suffix - construction variable for the suffix. |
FindSourceFiles(self, node='.')returns a list of all source files. |
get_builder(self, name)Fetch the builder with the specified name from the environment. |
get_factory(self, factory, default='File')Return a factory function for creating Nodes for this construction environment. |
get_scanner(self, skey)Find the appropriate scanner given a key (usually a file suffix). |
Ignore(self, target, dependency)Ignore a dependency. |
NoCache(self, *targets)Tags a target so that it will not be cached |
NoClean(self, *targets)Tags a target so that it will not be cleaned by -c |
ParseConfig(self, command, function=None, unique=1)Use the specified function to parse the output of the command in order to modify the current environment. The 'command' can be a string or a list of strings representing a command and its arguments. 'Function' is an optional argument that takes the environment, the output of the command, and the unique flag. If no function is specified, MergeFlags, which treats the output as the result of a typical 'X-config' command (i.e. gtk-config), will merge the output into the appropriate variables. |
ParseDepends(self, filename, must_exist=None, only_one=0)Parse a mkdep-style file for explicit dependencies. This is completely abusable, and should be unnecessary in the "normal" case of proper SCons configuration, but it may help make the transition from a Make hierarchy easier for some people to swallow. It can also be genuinely useful when using a tool that can write a .d file, but for which writing a scanner would be too complicated. |
Prepend(self, **kw)Prepend values to existing construction variables in an Environment. |
PrependENVPath(self, name, newpath, envname='ENV', sep=':')Prepend path elements to the path 'name' in the 'ENV' dictionary for this environment. Will only add any particular path once, and will normpath and normcase all paths to help assure this. This can also handle the case where the env variable is a list instead of a string. |
PrependUnique(self, **kw)Append values to existing construction variables in an Environment, if they're not already there. |
Replace(self, **kw)Replace existing construction variables in an Environment with new construction variables and/or values. |
ReplaceIxes(self, path, old_prefix, old_suffix, new_prefix, new_suffix)Replace old_prefix with new_prefix and old_suffix with new_suffix. env - Environment used to interpolate variables. path - the path that will be modified. old_prefix - construction variable for the old prefix. old_suffix - construction variable for the old suffix. new_prefix - construction variable for the new prefix. new_suffix - construction variable for the new suffix. |
Requires(self, target, prerequisite)Specify that 'prerequisite' must be built before 'target', (but 'target' does not actually depend on 'prerequisite' and need not be rebuilt if it changes). |
scanner_map_delete(self, kw=None)Delete the cached scanner map (if we need to). |
SideEffect(self, side_effect, target)Tell scons that side_effects are built as side effects of building targets. |
SourceCode(self, entry, builder)Arrange for a source code builder for (part of) a tree. |
Split(self, arg)
This function converts a string or list into a list of strings
or Nodes. This makes things easier for users by allowing files to
be specified as a white-space separated list to be split.
The input rules are:
- A single string containing names separated by spaces. These will be
split apart at the spaces.
- A single Node instance
- A list containing either strings or Node instances. Any strings
in the list are not split at spaces.
In all cases, the function returns a list of Nodes and strings.
|
WhereIs(self, prog, path=None, pathext=None, reject=[])Find prog in the path. |
| Class Variable Details |
|---|
memoizer_counters
|
| Home | Trees | Index | Help |
|
|---|
| Generated by Epydoc 2.1 on Wed Dec 12 09:39:32 2007 | http://epydoc.sf.net |