Base 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.
|
|
|
|
|
|
|
Alias(self,
target,
source=[ ] ,
action=None,
**kw) |
source code
|
|
|
|
|
Append(self,
**kw)
Append values to existing construction variables
in an Environment. |
source code
|
|
|
AppendENVPath(self,
name,
newpath,
envname=' ENV ' ,
sep=' : ' ,
delete_existing=1)
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. |
source code
|
|
|
AppendUnique(self,
delete_existing=0,
**kw)
Append values to existing construction variables
in an Environment, if they're not already there.
If delete_existing is 1, removes existing values first, so
values move to end. |
source code
|
|
|
|
|
|
|
|
|
|
|
Clone(self,
tools=[ ] ,
toolpath=None,
parse_flags=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. |
source code
|
|
|
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. |
source code
|
|
|
|
|
|
|
|
|
Depends(self,
target,
dependency)
Explicity specify that 'target's depend on 'dependency'. |
source code
|
|
|
Detect(self,
progs)
Return the first available program in progs. |
source code
|
|
|
|
|
|
|
Dump(self,
key=None)
Using the standard Python pretty printer, return the contents of the
scons build environment as a string. |
source code
|
|
|
|
|
|
|
Execute(self,
action,
*args,
**kw)
Directly execute an action through an Environment |
source code
|
|
|
|
|
|
|
FindInstalledFiles(self)
returns the list of all targets of the Install and InstallAs Builder. |
source code
|
|
|
FindIxes(self,
paths,
prefix,
suffix)
Search a list of paths for something that matches the prefix and suffix. |
source code
|
|
|
FindSourceFiles(self,
node=' . ' )
returns a list of all source files. |
source code
|
|
|
|
|
|
|
Glob(self,
pattern,
ondisk=True,
source=False,
strings=False,
exclude=None) |
source code
|
|
|
Ignore(self,
target,
dependency)
Ignore a dependency. |
source code
|
|
|
|
|
|
|
NoCache(self,
*targets)
Tags a target so that it will not be cached |
source code
|
|
|
NoClean(self,
*targets)
Tags a target so that it will not be cleaned by -c |
source code
|
|
|
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. |
source code
|
|
|
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. |
source code
|
|
|
|
|
|
|
Prepend(self,
**kw)
Prepend values to existing construction variables
in an Environment. |
source code
|
|
|
PrependENVPath(self,
name,
newpath,
envname=' ENV ' ,
sep=' : ' ,
delete_existing=1)
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. |
source code
|
|
|
PrependUnique(self,
delete_existing=0,
**kw)
Prepend values to existing construction variables
in an Environment, if they're not already there.
If delete_existing is 1, removes existing values first, so
values move to front. |
source code
|
|
|
|
|
Replace(self,
**kw)
Replace existing construction variables in an Environment
with new construction variables and/or values. |
source code
|
|
|
ReplaceIxes(self,
path,
old_prefix,
old_suffix,
new_prefix,
new_suffix)
Replace old_prefix with new_prefix and old_suffix with new_suffix. |
source code
|
|
|
|
|
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). |
source code
|
|
|
SConsignFile(self,
name=' .sconsign ' ,
dbm_module=None) |
source code
|
|
|
|
|
|
|
SideEffect(self,
side_effect,
target)
Tell scons that side_effects are built as side
effects of building targets. |
source code
|
|
|
SourceCode(self,
entry,
builder)
Arrange for a source code builder for (part of) a tree. |
source code
|
|
|
|
|
Split(self,
arg)
This function converts a string or list into a list of strings
or Nodes. |
source code
|
|
|
|
|
|
|
|
|
VariantDir(self,
variant_dir,
src_dir,
duplicate=1) |
source code
|
|
|
WhereIs(self,
prog,
path=None,
pathext=None,
reject=[ ] )
Find prog in the path. |
source code
|
|
|
__init__(self,
platform=None,
tools=None,
toolpath=None,
variables=None,
parse_flags=None,
**kw)
Initialization of a basic SCons construction environment,
including setting up special construction variables like BUILDER,
PLATFORM, etc., and searching for and applying available Tools. |
source code
|
|
|
|
|
_changed_build(self,
dependency,
target,
prev_ni) |
source code
|
|
|
_changed_content(self,
dependency,
target,
prev_ni) |
source code
|
|
|
_changed_source(self,
dependency,
target,
prev_ni) |
source code
|
|
|
_changed_timestamp_match(self,
dependency,
target,
prev_ni) |
source code
|
|
|
_changed_timestamp_newer(self,
dependency,
target,
prev_ni) |
source code
|
|
|
_changed_timestamp_then_content(self,
dependency,
target,
prev_ni) |
source code
|
|
|
|
|
|
|
|
|
|
|
_update(self,
dict)
Update an environment's values directly, bypassing the normal
checks that occur when users try to set items. |
source code
|
|
|
|
|
get_builder(self,
name)
Fetch the builder with the specified name from the environment. |
source code
|
|
|
get_factory(self,
factory,
default=' File ' )
Return a factory function for creating Nodes for this
construction environment. |
source code
|
|
|
get_scanner(self,
skey)
Find the appropriate scanner given a key (usually a file suffix). |
source code
|
|
|
|
|
|
|
scanner_map_delete(self,
kw=None)
Delete the cached scanner map (if we need to). |
source code
|
|
Inherited from SubstitutionEnvironment :
AddMethod ,
MergeFlags ,
Override ,
ParseFlags ,
RemoveMethod ,
__cmp__ ,
__contains__ ,
__delitem__ ,
__getitem__ ,
__setitem__ ,
arg2nodes ,
backtick ,
get ,
gvars ,
has_key ,
items ,
lvars ,
subst ,
subst_kw ,
subst_list ,
subst_path ,
subst_target_source
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|