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

Class Executor

source code

object --+
         |
        Executor

A class for controlling instances of executing an action.

This largely exists to hold a single association of an action, environment, list of environment override dictionaries, targets and sources for later processing as needed.

Nested Classes [hide private]
  __metaclass__
Instance Methods [hide private]
 
__init__(self, action, env=None, overridelist=[{}], targets=[], sources=[], builder_kw={})
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
get_lvars(self) source code
 
_get_changes(self) source code
 
_get_changed_sources(self, *args, **kw) source code
 
_get_changed_targets(self, *args, **kw) source code
 
_get_source(self, *args, **kw) source code
 
_get_sources(self, *args, **kw) source code
 
_get_target(self, *args, **kw) source code
 
_get_targets(self, *args, **kw) source code
 
_get_unchanged_sources(self, *args, **kw) source code
 
_get_unchanged_targets(self, *args, **kw) source code
 
get_action_targets(self) source code
 
set_action_list(self, action) source code
 
get_action_list(self) source code
 
get_all_targets(self)
Returns all targets for all batches of this Executor.
source code
 
get_all_sources(self)
Returns all sources for all batches of this Executor.
source code
 
get_all_children(self)
Returns all unique children (dependencies) for all batches of this Executor.
source code
 
get_all_prerequisites(self)
Returns all unique (order-only) prerequisites for all batches of this Executor.
source code
 
get_action_side_effects(self)
Returns all side effects for all batches of this Executor used by the underlying Action.
source code
 
get_build_env(self)
Fetch or create the appropriate build Environment for this Executor.
source code
 
get_build_scanner_path(self, scanner)
Fetch the scanner path for this executor's targets and sources.
source code
 
get_kw(self, kw={}) source code
 
do_nothing(self, target, kw) source code
 
do_execute(self, target, kw)
Actually execute the action list.
source code
 
__call__(self, target, **kw) source code
 
cleanup(self) source code
 
add_sources(self, sources)
Add source files to this Executor's list. This is necessary for "multi" Builders that can be called repeatedly to build up a source file list for a given target.
source code
 
get_sources(self) source code
 
add_batch(self, targets, sources)
Add pair of associated target and source to this Executor's list. This is necessary for "batch" Builders that can be called repeatedly to build up a list of matching target and source files that will be used in order to update multiple target files at once from multiple corresponding source files, for tools like MSVC that support it.
source code
 
prepare(self)
Preparatory checks for whether this Executor can go ahead and (try to) build its targets.
source code
 
add_pre_action(self, action) source code
 
add_post_action(self, action) source code
 
__str__(self)
str(x)
source code
 
nullify(self) source code
 
get_contents(self)
Fetch the signature contents. This is the main reason this class exists, so we can compute this once and cache it regardless of how many target or source Nodes there are.
source code
 
get_timestamp(self)
Fetch a time stamp for this Executor. We don't have one, of course (only files do), but this is the interface used by the timestamp module.
source code
 
scan_targets(self, scanner) source code
 
scan_sources(self, scanner) source code
 
scan(self, scanner, node_list)
Scan a list of this Executor's files (targets or sources) for implicit dependencies and update all of the targets with them. This essentially short-circuits an N*M scan of the sources for each individual target, which is a hell of a lot more efficient.
source code
 
_get_unignored_sources_key(self, node, ignore=()) source code
 
get_unignored_sources(self, node, ignore=()) source code
 
get_implicit_deps(self)
Return the executor's implicit dependencies, i.e. the nodes of the commands to be executed.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Class Variables [hide private]
  memoizer_counters = []
Instance Variables [hide private]
 
my_str(self) source code
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, action, env=None, overridelist=[{}], targets=[], sources=[], builder_kw={})
(Constructor)

source code 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides: object.__init__
(inherited documentation)

get_all_children(self)

source code 

Returns all unique children (dependencies) for all batches of this Executor.

The Taskmaster can recognize when it's already evaluated a Node, so we don't have to make this list unique for its intended canonical use case, but we expect there to be a lot of redundancy (long lists of batched .cc files #including the same .h files over and over), so removing the duplicates once up front should save the Taskmaster a lot of work.

__str__(self)
(Informal representation operator)

source code 
str(x)
Overrides: object.__str__
(inherited documentation)