Package SCons :: Package Script :: Module Main
[hide private]
[frames] | no frames]

Module Main

source code

SCons.Script

This file implements the main() function used by the scons script.

Architecturally, this is the scons script, and will likely only be called from the external "scons" wrapper. Consequently, anything here should not be, or be considered, part of the build engine. If it's something that we expect other software to want to use, it should go in some other module. If it's specific to the "scons" script invocation, it goes here.

Classes [hide private]
  SConsPrintHelpException
  Progressor
  BuildTask
An SCons build task.
  CleanTask
An SCons clean task.
  QuestionTask
An SCons task for the -q (question) option.
  TreePrinter
  FakeOptionParser
A do-nothing option parser, used for the initial OptionsParser variable.
  Stats
  CountStats
  MemStats
Functions [hide private]
 
fetch_win32_parallel_msg() source code
 
Progress(*args, **kw) source code
 
GetBuildFailures() source code
 
python_version_string() source code
 
python_version_unsupported(version=(2, 6, 2, 'final', 0)) source code
 
python_version_deprecated(version=(2, 6, 2, 'final', 0)) source code
 
AddOption(*args, **kw) source code
 
GetOption(name) source code
 
SetOption(name, value) source code
 
_scons_syntax_error(e)
Handle syntax errors.
source code
 
find_deepest_user_frame(tb)
Find the deepest stack frame that is not part of SCons.
source code
 
_scons_user_error(e)
Handle user errors.
source code
 
_scons_user_warning(e)
Handle user warnings.
source code
 
_scons_internal_warning(e)
Slightly different from _scons_user_warning in that we use the current call stack rather than sys.exc_info() to get our stack trace.
source code
 
_scons_internal_error()
Handle all errors but user errors.
source code
 
_SConstruct_exists(dirname='', repositories=[], filelist=None)
This function checks that an SConstruct file exists in a directory.
source code
 
_set_debug_values(options) source code
 
_create_path(plist) source code
 
_load_site_scons_dir(topdir, site_dir_name=None)
Load the site_scons dir under topdir.
source code
 
_load_all_site_scons_dirs(topdir, verbose=None)
Load all of the predefined site_scons dir.
source code
 
test_load_all_site_scons_dirs(d) source code
 
version_string(label, module) source code
 
path_string(label, module) source code
 
_main(parser) source code
 
_build_targets(fs, options, targets, target_top) source code
 
_exec_main(parser, values) source code
 
main() source code
Variables [hide private]
  unsupported_python_version = (2, 3, 0)
  deprecated_python_version = (2, 4, 0)
  __revision__ = 'src/engine/SCons/Script/Main.py 5357 2011/09/0...
  display = DisplayEngine()
  progress_display = SCons.Util.DisplayEngine()
  first_command_start = None
hash(x)
  last_command_end = None
hash(x)
  ProgressObject = Null(0x094BE82C)
  _BuildFailures = []
  print_objects = 0
  print_memoizer = 0
  print_stacktrace = 0
  print_time = 0
  sconscript_time = 0
  cumulative_command_time = 0
  exit_status = 0
  this_build_status = 0
  num_jobs = None
hash(x)
  delayed_warnings = []
  OptionsParser = FakeOptionParser()
  count_stats = CountStats()
  memory_stats = MemStats()
  __package__ = 'SCons.Script'
Function Details [hide private]

_scons_syntax_error(e)

source code 
Handle syntax errors. Print out a message and show where the error occurred.

find_deepest_user_frame(tb)

source code 

Find the deepest stack frame that is not part of SCons.

Input is a "pre-processed" stack trace in the form returned by traceback.extract_tb() or traceback.extract_stack()

_scons_user_error(e)

source code 
Handle user errors. Print out a message and a description of the error, along with the line number and routine where it occured. The file and line number will be the deepest stack frame that is not part of SCons itself.

_scons_user_warning(e)

source code 
Handle user warnings. Print out a message and a description of the warning, along with the line number and routine where it occured. The file and line number will be the deepest stack frame that is not part of SCons itself.

_scons_internal_warning(e)

source code 
Slightly different from _scons_user_warning in that we use the current call stack rather than sys.exc_info() to get our stack trace. This is used by the warnings framework to print warnings.

_scons_internal_error()

source code 
Handle all errors but user errors. Print out a message telling the user what to do in this case and print a normal trace.

_SConstruct_exists(dirname='', repositories=[], filelist=None)

source code 
This function checks that an SConstruct file exists in a directory. If so, it returns the path of the file. By default, it checks the current directory.

_load_site_scons_dir(topdir, site_dir_name=None)

source code 
Load the site_scons dir under topdir. Prepends site_scons to sys.path, imports site_scons/site_init.py, and prepends site_scons/site_tools to default toolpath.

_load_all_site_scons_dirs(topdir, verbose=None)

source code 
Load all of the predefined site_scons dir. Order is significant; we load them in order from most generic (machine-wide) to most specific (topdir). The verbose argument is only for testing.

Variables Details [hide private]

__revision__

Value:
'src/engine/SCons/Script/Main.py 5357 2011/09/09 21:31:03 bdeegan'