parameters: (self,
                   platform=None,
                   tools=None,
                   toolpath=None,
                   variables=None,
                   parse_flags = None,
                   **kw)
docstring: Initialization of a basic SCons construction environment,
          including setting up special construction variables like BUILDER,
          PLATFORM, etc., and searching for and applying available Tools.
  
          Note that we do *not* call the underlying base class
          (SubsitutionEnvironment) initialization, because we need to
          initialize things in a very specific order that doesn't work
          with the much simpler base class initialization.
docstring_summary: Initialization of a basic SCons construction environment,
          including setting up special construction variables like BUILDER,
          PLATFORM, etc., and searching for and applying available Tools.
docstring_tokens: Initialization of a basic SCons construction environment including setting up special construction variables like BUILDER PLATFORM etc . and searching for and applying available Tools .
function: def __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.
  
          Note that we do *not* call the underlying base class
          (SubsitutionEnvironment) initialization, because we need to
          initialize things in a very specific order that doesn't work
          with the much simpler base class initialization.
          """
          if SCons.Debug.track_instances: logInstanceCreation(self, 'Environment.Base')
          self._memo = {}
          self.fs = SCons.Node.FS.get_default_fs()
          self.ans = SCons.Node.Alias.default_ans
          self.lookup_list = SCons.Node.arg2nodes_lookups
          self._dict = semi_deepcopy(SCons.Defaults.ConstructionEnvironment)
          self._init_special()
          self.added_methods = []
  
          # We don't use AddMethod, or define these as methods in this
          # class, because we *don't* want these functions to be bound
          # methods.  They need to operate independently so that the
          # settings will work properly regardless of whether a given
          # target ends up being built with a Base environment or an
          # OverrideEnvironment or what have you.
          self.decide_target = default_decide_target
          self.decide_source = default_decide_source
  
          self.copy_from_cache = default_copy_from_cache
  
          self._dict['BUILDERS'] = BuilderDict(self._dict['BUILDERS'], self)
  
          if platform is None:
              platform = self._dict.get('PLATFORM', None)
              if platform is None:
                  platform = SCons.Platform.Platform()
          if SCons.Util.is_String(platform):
              platform = SCons.Platform.Platform(platform)
          self._dict['PLATFORM'] = str(platform)
          platform(self)
  
          self._dict['HOST_OS']      = self._dict.get('HOST_OS',None)
          self._dict['HOST_ARCH']    = self._dict.get('HOST_ARCH',None)
  
          # Now set defaults for TARGET_{OS|ARCH}
          self._dict['TARGET_OS']      = self._dict.get('TARGET_OS',None)
          self._dict['TARGET_ARCH']    = self._dict.get('TARGET_ARCH',None)
  
  
          # Apply the passed-in and customizable variables to the
          # environment before calling the tools, because they may use
          # some of them during initialization.
          if 'options' in kw:
              # Backwards compatibility:  they may stll be using the
              # old "options" keyword.
              variables = kw['options']
              del kw['options']
          self.Replace(**kw)
          keys = list(kw.keys())
          if variables:
              keys = keys + list(variables.keys())
              variables.Update(self)
  
          save = {}
          for k in keys:
              try:
                  save[k] = self._dict[k]
              except KeyError:
                  # No value may have been set if they tried to pass in a
                  # reserved variable name like TARGETS.
                  pass
  
          SCons.Tool.Initializers(self)
  
          if tools is None:
              tools = self._dict.get('TOOLS', None)
              if tools is None:
                  tools = ['default']
          apply_tools(self, tools, toolpath)
  
          # Now restore the passed-in and customized variables
          # to the environment, since the values the user set explicitly
          # should override any values set by the tools.
          for key, val in save.items():
              self._dict[key] = val
  
          # Finally, apply any flags to be merged in
          if parse_flags: self.MergeFlags(parse_flags)
function_tokens: def __init__ ( self , platform = None , tools = None , toolpath = None , variables = None , parse_flags = None , * * kw ) : if SCons . Debug . track_instances : logInstanceCreation ( self , 'Environment.Base' ) self . _memo = { } self . fs = SCons . Node . FS . get_default_fs ( ) self . ans = SCons . Node . Alias . default_ans self . lookup_list = SCons . Node . arg2nodes_lookups self . _dict = semi_deepcopy ( SCons . Defaults . ConstructionEnvironment ) self . _init_special ( ) self . added_methods = [ ] # We don't use AddMethod, or define these as methods in this # class, because we *don't* want these functions to be bound # methods.  They need to operate independently so that the # settings will work properly regardless of whether a given # target ends up being built with a Base environment or an # OverrideEnvironment or what have you. self . decide_target = default_decide_target self . decide_source = default_decide_source self . copy_from_cache = default_copy_from_cache self . _dict [ 'BUILDERS' ] = BuilderDict ( self . _dict [ 'BUILDERS' ] , self ) if platform is None : platform = self . _dict . get ( 'PLATFORM' , None ) if platform is None : platform = SCons . Platform . Platform ( ) if SCons . Util . is_String ( platform ) : platform = SCons . Platform . Platform ( platform ) self . _dict [ 'PLATFORM' ] = str ( platform ) platform ( self ) self . _dict [ 'HOST_OS' ] = self . _dict . get ( 'HOST_OS' , None ) self . _dict [ 'HOST_ARCH' ] = self . _dict . get ( 'HOST_ARCH' , None ) # Now set defaults for TARGET_{OS|ARCH} self . _dict [ 'TARGET_OS' ] = self . _dict . get ( 'TARGET_OS' , None ) self . _dict [ 'TARGET_ARCH' ] = self . _dict . get ( 'TARGET_ARCH' , None ) # Apply the passed-in and customizable variables to the # environment before calling the tools, because they may use # some of them during initialization. if 'options' in kw : # Backwards compatibility:  they may stll be using the # old "options" keyword. variables = kw [ 'options' ] del kw [ 'options' ] self . Replace ( * * kw ) keys = list ( kw . keys ( ) ) if variables : keys = keys + list ( variables . keys ( ) ) variables . Update ( self ) save = { } for k in keys : try : save [ k ] = self . _dict [ k ] except KeyError : # No value may have been set if they tried to pass in a # reserved variable name like TARGETS. pass SCons . Tool . Initializers ( self ) if tools is None : tools = self . _dict . get ( 'TOOLS' , None ) if tools is None : tools = [ 'default' ] apply_tools ( self , tools , toolpath ) # Now restore the passed-in and customized variables # to the environment, since the values the user set explicitly # should override any values set by the tools. for key , val in save . items ( ) : self . _dict [ key ] = val # Finally, apply any flags to be merged in if parse_flags : self . MergeFlags ( parse_flags )