Package SCons :: Module Taskmaster
[hide private]
[frames] | no frames]

Module Taskmaster

source code

This module contains the primary interface(s) between a wrapping user interface and the SCons build engine. There are two key classes here:

Taskmaster

This is the main engine for walking the dependency graph and calling things to decide what does or doesn't need to be built.

Task

This is the base class for allowing a wrapping interface to decide what does or doesn't actually need to be done. The intention is for a wrapping interface to subclass this as appropriate for different types of behavior it may need.

The canonical example is the SCons native Python interface, which has Task subclasses that handle its specific behavior, like printing "'foo' is up to date" when a top-level target doesn't need to be built, and handling the -c option by removing targets as its "build" action. There is also a separate subclass for suppressing this output when the -q option is used.

The Taskmaster instantiates a Task object for each (set of) target(s) that it decides need to be evaluated and/or built.

Classes [hide private]
  Stats
A simple class for holding statistics about the disposition of a Node by the Taskmaster. If we're collecting statistics, each Node processed by the Taskmaster gets one of these attached, in which case the Taskmaster records its decision each time it processes the Node. (Ideally, that's just once per Node.)
  Task
Default SCons build engine task.
  AlwaysTask
  OutOfDateTask
  Taskmaster
The Taskmaster for walking the dependency DAG.
Functions [hide private]
 
dump_stats() source code
 
find_cycle(stack, visited) source code
Variables [hide private]
  __doc__ = ...
  __revision__ = 'src/engine/SCons/Taskmaster.py 3a41ed6b288cee8...
  StateString = {0: 'no_state', 1: 'pending', 2: 'executing', 3:...
  NODE_NO_STATE = 0
  NODE_PENDING = 1
  NODE_EXECUTING = 2
  NODE_UP_TO_DATE = 3
  NODE_EXECUTED = 4
  NODE_FAILED = 5
  print_prepare = 0
  CollectStats = None
hash(x)
  StatsNodes = []
  fmt = '%(considered)3d %(already_handled)3d %(problem)3d %(chi...
  __package__ = 'SCons'
Variables Details [hide private]

__doc__

Value:
"""
    Generic Taskmaster module for the SCons build engine.
    =====================================================
    
    This module contains the primary interface(s) between a wrapping u\
ser
    interface and the SCons build engine.  There are two key classes h\
ere:
...

__revision__

Value:
'src/engine/SCons/Taskmaster.py 3a41ed6b288cee8d085373ad7fa02894e19038\
64 2019-01-23 17:30:35 bdeegan'

StateString

Value:
{0: 'no_state',
 1: 'pending',
 2: 'executing',
 3: 'up_to_date',
 4: 'executed',
 5: 'failed'}

fmt

Value:
'%(considered)3d %(already_handled)3d %(problem)3d %(child_failed)3d %\
(not_built)3d %(side_effects)3d %(build)3d '