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

Module Defaults

source code

SCons.Defaults

Builders and other things for the local site.  Here's where we'll
duplicate the functionality of autoconf until we move it into the
installation procedure or use something like qmconf.

The code that reads the registry to find MSVC components was borrowed
from distutils.msvccompiler.



Classes [hide private]
  NullCmdGenerator
This is a callable class that can be used in place of other command generators if you don't want them to do anything.
  Variable_Method_Caller
A class for finding a construction variable on the stack and calling one of its methods.
Functions [hide private]
 
_fetch_DefaultEnvironment(*args, **kw)
Returns the already-created default construction environment.
source code
 
DefaultEnvironment(*args, **kw)
Initial public entry point for creating the default construction Environment.
source code
 
StaticObjectEmitter(target, source, env) source code
 
SharedObjectEmitter(target, source, env) source code
 
SharedFlagChecker(source, target, env) source code
 
get_paths_str(dest) source code
 
chmod_func(dest, mode) source code
 
chmod_strfunc(dest, mode) source code
 
copy_func(dest, src) source code
 
delete_func(dest, must_exist=0) source code
 
delete_strfunc(dest, must_exist=0) source code
 
mkdir_func(dest) source code
 
move_func(dest, src) source code
 
touch_func(dest) source code
 
_concat(prefix, list, suffix, env, f=<function <lambda> at 0x87744fc>, target=False, source=False)
Creates a new list from 'list' by first interpolating each element in the list using the 'env' dictionary and then calling f on the list, and finally calling _concat_ixes to concatenate 'prefix' and 'suffix' onto each element of the list.
source code
 
_concat_ixes(prefix, list, suffix, env)
Creates a new list from 'list' by concatenating the 'prefix' and 'suffix' arguments onto each element of the list.
source code
 
_stripixes(prefix, itms, suffix, stripprefixes, stripsuffixes, env, c=False)
This is a wrapper around _concat()/_concat_ixes() that checks for the existence of prefixes or suffixes on list items and strips them where it finds them.
source code
 
processDefines(defs)
process defines, resolving strings, lists, dictionaries, into a list of...
source code
 
_defines(prefix, defs, suffix, env, c=<function _concat_ixes at 0x877456c>)
A wrapper around _concat_ixes that turns a list or string into a list of C preprocessor command-line definitions.
source code
Variables [hide private]
  __revision__ = 'src/engine/SCons/Defaults.py 5023 2010/06/14 2...
  _default_env = False
  SharedCheck = SCons.Action.Action(SharedFlagChecker, None)
  CScan = SCons.Tool.CScanner
  DScan = SCons.Tool.DScanner
  LaTeXScan = SCons.Tool.LaTeXScanner
  ObjSourceScan = SCons.Tool.SourceFileScanner
  ProgScan = SCons.Tool.ProgramScanner
  DirScanner = SCons.Scanner.Dir.DirScanner()
  DirEntryScanner = SCons.Scanner.Dir.DirEntryScanner()
  CAction = SCons.Action.Action("$CCCOM", "$CCCOMSTR")
  ShCAction = SCons.Action.Action("$SHCCCOM", "$SHCCCOMSTR")
  CXXAction = SCons.Action.Action("$CXXCOM", "$CXXCOMSTR")
  ShCXXAction = SCons.Action.Action("$SHCXXCOM", "$SHCXXCOMSTR")
  ASAction = SCons.Action.Action("$ASCOM", "$ASCOMSTR")
  ASPPAction = SCons.Action.Action("$ASPPCOM", "$ASPPCOMSTR")
  LinkAction = SCons.Action.Action("$LINKCOM", "$LINKCOMSTR")
  ShLinkAction = SCons.Action.Action("$SHLINKCOM", "$SHLINKCOMSTR")
  LdModuleLinkAction = <SCons.Action.LazyAction object at 0x876c...
  Chmod = ActionFactory(chmod_func, chmod_strfunc)
  Copy = ActionFactory(copy_func, lambda dest, src: 'Copy("%s", ...
  Delete = ActionFactory(delete_func, delete_strfunc)
  Mkdir = ActionFactory(mkdir_func, lambda dir: 'Mkdir(%s)' % ge...
  Move = ActionFactory(move_func, lambda dest, src: 'Move("%s", ...
  Touch = ActionFactory(touch_func, lambda file: 'Touch(%s)' % g...
  ConstructionEnvironment = {'BUILDERS': {}, 'CONFIGUREDIR': '#/...
Function Details [hide private]

DefaultEnvironment(*args, **kw)

source code 

Initial public entry point for creating the default construction
Environment.

After creating the environment, we overwrite our name
(DefaultEnvironment) with the _fetch_DefaultEnvironment() function,
which more efficiently returns the initialized default construction
environment without checking for its existence.

(This function still exists with its _default_check because someone
else (*cough* Script/__init__.py *cough*) may keep a reference
to this function.  So we can't use the fully functional idiom of
having the name originally be a something that *only* creates the
construction environment and then overwrites the name.)

_concat_ixes(prefix, list, suffix, env)

source code 

Creates a new list from 'list' by concatenating the 'prefix' and
'suffix' arguments onto each element of the list.  A trailing space
on 'prefix' or leading space on 'suffix' will cause them to be put
into separate list elements rather than being concatenated.

_stripixes(prefix, itms, suffix, stripprefixes, stripsuffixes, env, c=False)

source code 

This is a wrapper around _concat()/_concat_ixes() that checks for
the existence of prefixes or suffixes on list items and strips them
where it finds them.  This is used by tools (like the GNU linker)
that need to turn something like 'libfoo.a' into '-lfoo'.

processDefines(defs)

source code 
process defines, resolving strings, lists, dictionaries, into a list of
strings


Variables Details [hide private]

__revision__

Value:
'src/engine/SCons/Defaults.py 5023 2010/06/14 22:05:46 scons'

LdModuleLinkAction

Value:
SCons.Action.Action("$LDMODULECOM", "$LDMODULECOMSTR")

Copy

Value:
ActionFactory(copy_func, lambda dest, src: 'Copy("%s", "%s")' %(dest, \
src), convert= str)

Mkdir

Value:
ActionFactory(mkdir_func, lambda dir: 'Mkdir(%s)' % get_paths_str(dir)\
)

Move

Value:
ActionFactory(move_func, lambda dest, src: 'Move("%s", "%s")' %(dest, \
src), convert= str)

Touch

Value:
ActionFactory(touch_func, lambda file: 'Touch(%s)' % get_paths_str(fil\
e))

ConstructionEnvironment

Value:
{'BUILDERS': {},
 'CONFIGUREDIR': '#/.sconf_temp',
 'CONFIGURELOG': '#/config.log',
 'CPPSUFFIXES': ['.c',
                 '.C',
                 '.cxx',
                 '.cpp',
                 '.c++',
...