<s> """<STR_LIT>""" <EOL> __revision__ = "<STR_LIT>" <EOL> import imp <EOL> import sys <EOL> import re <EOL> import os <EOL> import shutil <EOL> import SCons . Builder <EOL> import SCons . Errors <EOL> import SCons . Node . FS <EOL> import SCons . Scanner <EOL> import SCons . Scanner . C <EOL> import SCons . Scanner . D <EOL> import SCons . Scanner . LaTeX <EOL> import SCons . Scanner . Prog <EOL> DefaultToolpath = [ ] <EOL> CScanner = SCons . Scanner . C . CScanner ( ) <EOL> DScanner = SCons . Scanner . D . DScanner ( ) <EOL> LaTeXScanner = SCons . Scanner . LaTeX . LaTeXScanner ( ) <EOL> PDFLaTeXScanner = SCons . Scanner . LaTeX . PDFLaTeXScanner ( ) <EOL> ProgramScanner = SCons . Scanner . Prog . ProgramScanner ( ) <EOL> SourceFileScanner = SCons . Scanner . Base ( { } , name = '<STR_LIT>' ) <EOL> CSuffixes = [ "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ] <EOL> DSuffixes = [ '<STR_LIT>' ] <EOL> IDLSuffixes = [ "<STR_LIT>" , "<STR_LIT>" ] <EOL> LaTeXSuffixes = [ "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ] <EOL> for suffix in CSuffixes : <EOL> SourceFileScanner . add_scanner ( suffix , CScanner ) <EOL> for suffix in DSuffixes : <EOL> SourceFileScanner . add_scanner ( suffix , DScanner ) <EOL> for suffix in LaTeXSuffixes : <EOL> SourceFileScanner . add_scanner ( suffix , LaTeXScanner ) <EOL> SourceFileScanner . add_scanner ( suffix , PDFLaTeXScanner ) <EOL> class Tool ( object ) : <EOL> def __init__ ( self , name , toolpath = [ ] , ** kw ) : <EOL> self . name = name <EOL> self . toolpath = toolpath + DefaultToolpath <EOL> self . init_kw = kw <EOL> module = self . _tool_module ( ) <EOL> self . generate = module . generate <EOL> self . exists = module . exists <EOL> if hasattr ( module , '<STR_LIT>' ) : <EOL> self . options = module . options <EOL> def _tool_module ( self ) : <EOL> oldpythonpath = sys . path <EOL> sys . path = self . toolpath + sys . path <EOL> try : <EOL> try : <EOL> file , path , desc = imp . find_module ( self . name , self . toolpath ) <EOL> try : <EOL> return imp . load_module ( self . name , file , path , desc ) <EOL> finally : <EOL> if file : <EOL> file . close ( ) <EOL> except ImportError , e : <EOL> if str ( e ) != "<STR_LIT>" % self . name : <EOL> raise SCons . Errors . EnvironmentError ( e ) <EOL> try : <EOL> import zipimport <EOL> except ImportError : <EOL> pass <EOL> else : <EOL> for aPath in self . toolpath : <EOL> try : <EOL> importer = zipimport . zipimporter ( aPath ) <EOL> return importer . load_module ( self . name ) <EOL> except ImportError , e : <EOL> pass <EOL> finally : <EOL> sys . path = oldpythonpath <EOL> full_name = '<STR_LIT>' + self . name <EOL> try : <EOL> return sys . modules [ full_name ] <EOL> except KeyError : <EOL> try : <EOL> smpath = sys . modules [ '<STR_LIT>' ] . __path__ <EOL> try : <EOL> file , path , desc = imp . find_module ( self . name , smpath ) <EOL> module = imp . load_module ( full_name , file , path , desc ) <EOL> setattr ( SCons . Tool , self . name , module ) <EOL> if file : <EOL> file . close ( ) <EOL> return module <EOL> except ImportError , e : <EOL> if str ( e ) != "<STR_LIT>" % self . name : <EOL> raise SCons . Errors . EnvironmentError ( e ) <EOL> try : <EOL> import zipimport <EOL> importer = zipimport . zipimporter ( sys . modules [ '<STR_LIT>' ] . __path__ [ <NUM_LIT:0> ] ) <EOL> module = importer . load_module ( full_name ) <EOL> setattr ( SCons . Tool , self . name , module ) <EOL> return module <EOL> except ImportError , e : <EOL> m = "<STR_LIT>" % ( self . name , e ) <EOL> raise SCons . Errors . EnvironmentError ( m ) <EOL> except ImportError , e : <EOL> m = "<STR_LIT>" % ( self . name , e ) <EOL> raise SCons . Errors . EnvironmentError ( m ) <EOL> def __call__ ( self , env , * args , ** kw ) : <EOL> if self . init_kw is not None : <EOL> if kw is not None : <EOL> call_kw = kw <EOL> kw = self . init_kw . copy ( ) <EOL> kw . update ( call_kw ) <EOL> else : <EOL> kw = self . init_kw <EOL> env . Append ( TOOLS = [ self . name ] ) <EOL> if hasattr ( self , '<STR_LIT>' ) : <EOL> import SCons . Variables <EOL> if '<STR_LIT>' not in env : <EOL> from SCons . Script import ARGUMENTS <EOL> env [ '<STR_LIT>' ] = SCons . Variables . Variables ( args = ARGUMENTS ) <EOL> opts = env [ '<STR_LIT>' ] <EOL> self . options ( opts ) <EOL> opts . Update ( env ) <EOL> self . generate ( env , * args , ** kw ) <EOL> def __str__ ( self ) : <EOL> return self . name <EOL> def createProgBuilder ( env ) : <EOL> """<STR_LIT>""" <EOL> try : <EOL> program = env [ '<STR_LIT>' ] [ '<STR_LIT>' ] <EOL> except KeyError : <EOL> import SCons . Defaults <EOL> program = SCons . Builder . Builder ( action = SCons . Defaults . LinkAction , <EOL> emitter = '<STR_LIT>' , <EOL> prefix = '<STR_LIT>' , <EOL> suffix = '<STR_LIT>' , <EOL> src_suffix = '<STR_LIT>' , <EOL> src_builder = '<STR_LIT>' , <EOL> target_scanner = ProgramScanner ) <EOL> env [ '<STR_LIT>' ] [ '<STR_LIT>' ] = program <EOL> return program <EOL> def createStaticLibBuilder ( env ) : <EOL> """<STR_LIT>""" <EOL> try : <EOL> static_lib = env [ '<STR_LIT>' ] [ '<STR_LIT>' ] <EOL> except KeyError : <EOL> action_list = [ SCons . Action . Action ( "<STR_LIT>" , "<STR_LIT>" ) ] <EOL> if env . Detect ( '<STR_LIT>' ) : <EOL> ranlib_action = SCons . Action . Action ( "<STR_LIT>" , "<STR_LIT>" ) <EOL> action_list . append ( ranlib_action ) <EOL> static_lib = SCons . Builder . Builder ( action = action_list , <EOL> emitter = '<STR_LIT>' , <EOL> prefix = '<STR_LIT>' , <EOL> suffix = '<STR_LIT>' , <EOL> src_suffix = '<STR_LIT>' , <EOL> src_builder = '<STR_LIT>' ) <EOL> env [ '<STR_LIT>' ] [ '<STR_LIT>' ] = static_lib <EOL> env [ '<STR_LIT>' ] [ '<STR_LIT>' ] = static_lib <EOL> return static_lib <EOL> def VersionShLibLinkNames ( version , libname , env ) : <EOL> """<STR_LIT>""" <EOL> Verbose = False <EOL> platform = env . subst ( '<STR_LIT>' ) <EOL> shlib_suffix = env . subst ( '<STR_LIT>' ) <EOL> shlink_flags = SCons . Util . CLVar ( env . subst ( '<STR_LIT>' ) ) <EOL> linknames = [ ] <EOL> if version . count ( "<STR_LIT:.>" ) != <NUM_LIT:2> : <EOL> raise ValueError <EOL> if platform == '<STR_LIT>' : <EOL> suffix_re = re . escape ( '<STR_LIT:.>' + version + shlib_suffix ) <EOL> linkname = re . sub ( suffix_re , shlib_suffix , libname ) <EOL> if Verbose : <EOL> print "<STR_LIT>" , linkname <EOL> linknames . append ( linkname ) <EOL> elif platform == '<STR_LIT>' : <EOL> if sys . platform . startswith ( '<STR_LIT>' ) : <EOL> return [ ] <EOL> suffix_re = re . escape ( shlib_suffix + '<STR_LIT:.>' + version ) <EOL> linkname = re . sub ( suffix_re , shlib_suffix , libname ) <EOL> if Verbose : <EOL> print "<STR_LIT>" , linkname <EOL> linknames . append ( linkname ) <EOL> versionparts = version . split ( '<STR_LIT:.>' ) <EOL> major_name = linkname + "<STR_LIT:.>" + versionparts [ <NUM_LIT:0> ] <EOL> minor_name = major_name + "<STR_LIT:.>" + versionparts [ <NUM_LIT:1> ] <EOL> for linkname in [ major_name , ] : <EOL> if Verbose : <EOL> print "<STR_LIT>" , linkname , "<STR_LIT>" , libname <EOL> linknames . append ( linkname ) <EOL> return linknames <EOL> def VersionedSharedLibrary ( target = None , source = None , env = None ) : <EOL> """<STR_LIT>""" <EOL> Verbose = False <EOL> try : <EOL> version = env . subst ( '<STR_LIT>' ) <EOL> except KeyError : <EOL> version = None <EOL> libname = target [ <NUM_LIT:0> ] . name <EOL> platform = env . subst ( '<STR_LIT>' ) <EOL> shlib_suffix = env . subst ( '<STR_LIT>' ) <EOL> shlink_flags = SCons . Util . CLVar ( env . subst ( '<STR_LIT>' ) ) <EOL> if Verbose : <EOL> print "<STR_LIT>" , libname <EOL> print "<STR_LIT>" , platform <EOL> print "<STR_LIT>" , shlib_suffix <EOL> print "<STR_LIT>" , str ( target [ <NUM_LIT:0> ] ) <EOL> if version : <EOL> if platform == '<STR_LIT>' : <EOL> shlink_flags += [ '<STR_LIT>' ] <EOL> if not sys . platform . startswith ( '<STR_LIT>' ) : <EOL> suffix_re = re . escape ( shlib_suffix + '<STR_LIT:.>' + version ) <EOL> ( major , age , revision ) = version . split ( "<STR_LIT:.>" ) <EOL> soname = re . sub ( suffix_re , shlib_suffix , libname ) + '<STR_LIT:.>' + major <EOL> shlink_flags += [ '<STR_LIT>' % soname ] <EOL> if Verbose : <EOL> print "<STR_LIT>" , soname , "<STR_LIT>" , shlink_flags <EOL> elif platform == '<STR_LIT>' : <EOL> shlink_flags += [ '<STR_LIT>' , <EOL> '<STR_LIT>' ] <EOL> elif platform == '<STR_LIT>' : <EOL> shlink_flags += [ '<STR_LIT>' , '<STR_LIT:%s>' % version , <EOL> '<STR_LIT>' , '<STR_LIT:%s>' % version , <EOL> '<STR_LIT>' , '<STR_LIT>' ] <EOL> if Verbose : <EOL> print "<STR_LIT>" , shlink_flags <EOL> envlink = env . Clone ( ) <EOL> envlink [ '<STR_LIT>' ] = shlink_flags <EOL> else : <EOL> envlink = env <EOL> result = SCons . Defaults . ShLinkAction ( target , source , envlink ) <EOL> if version : <EOL> libname = target [ <NUM_LIT:0> ] . path <EOL> linknames = VersionShLibLinkNames ( version , libname , env ) <EOL> if Verbose : <EOL> print "<STR_LIT>" , linknames <EOL> lib_ver = target [ <NUM_LIT:0> ] . name <EOL> for count in range ( len ( linknames ) ) : <EOL> linkname = linknames [ count ] <EOL> if count > <NUM_LIT:0> : <EOL> try : <EOL> os . remove ( lastlinkname ) <EOL> except : <EOL> pass <EOL> os . symlink ( os . path . basename ( linkname ) , lastlinkname ) <EOL> if Verbose : <EOL> print "<STR_LIT>" % ( lastlinkname , linkname ) <EOL> lastlinkname = linkname <EOL> if len ( linknames ) > <NUM_LIT:0> : <EOL> try : <EOL> os . remove ( lastlinkname ) <EOL> except : <EOL> pass <EOL> os . symlink ( lib_ver , lastlinkname ) <EOL> if Verbose : <EOL> print "<STR_LIT>" % ( linkname , lib_ver ) <EOL> return result <EOL> ShLibAction = SCons . Action . Action ( VersionedSharedLibrary , None , varlist = [ '<STR_LIT>' ] ) <EOL> def createSharedLibBuilder ( env ) : <EOL> """<STR_LIT>""" <EOL> try : <EOL> shared_lib = env [ '<STR_LIT>' ] [ '<STR_LIT>' ] <EOL> except KeyError : <EOL> import SCons . Defaults <EOL> action_list = [ SCons . Defaults . SharedCheck , <EOL> ShLibAction ] <EOL> shared_lib = SCons . Builder . Builder ( action = action_list , <EOL> emitter = "<STR_LIT>" , <EOL> prefix = '<STR_LIT>' , <EOL> suffix = '<STR_LIT>' , <EOL> target_scanner = ProgramScanner , <EOL> src_suffix = '<STR_LIT>' , <EOL> src_builder = '<STR_LIT>' ) <EOL> env [ '<STR_LIT>' ] [ '<STR_LIT>' ] = shared_lib <EOL> return shared_lib <EOL> def createLoadableModuleBuilder ( env ) : <EOL> """<STR_LIT>""" <EOL> try : <EOL> ld_module = env [ '<STR_LIT>' ] [ '<STR_LIT>' ] <EOL> except KeyError : <EOL> import SCons . Defaults <EOL> action_list = [ SCons . Defaults . SharedCheck , <EOL> SCons . Defaults . LdModuleLinkAction ] <EOL> ld_module = SCons . Builder . Builder ( action = action_list , <EOL> emitter = "<STR_LIT>" , <EOL> prefix = '<STR_LIT>' , <EOL> suffix = '<STR_LIT>' , <EOL> target_scanner = ProgramScanner , <EOL> src_suffix = '<STR_LIT>' , <EOL> src_builder = '<STR_LIT>' ) <EOL> env [ '<STR_LIT>' ] [ '<STR_LIT>' ] = ld_module <EOL> return ld_module <EOL> def createObjBuilders ( env ) : <EOL> """<STR_LIT>""" <EOL> try : <EOL> static_obj = env [ '<STR_LIT>' ] [ '<STR_LIT>' ] <EOL> except KeyError : <EOL> static_obj = SCons . Builder . Builder ( action = { } , <EOL> emitter = { } , <EOL> prefix = '<STR_LIT>' , <EOL> suffix = '<STR_LIT>' , <EOL> src_builder = [ '<STR_LIT>' , '<STR_LIT>' ] , <EOL> source_scanner = SourceFileScanner , <EOL> single_source = <NUM_LIT:1> ) <EOL> env [ '<STR_LIT>' ] [ '<STR_LIT>' ] = static_obj <EOL> env [ '<STR_LIT>' ] [ '<STR_LIT>' ] = static_obj <EOL> try : <EOL> shared_obj = env [ '<STR_LIT>' ] [ '<STR_LIT>' ] <EOL> except KeyError : <EOL> shared_obj = SCons . Builder . Builder ( action = { } , <EOL> emitter = { } , <EOL> prefix = '<STR_LIT>' , <EOL> suffix = '<STR_LIT>' , <EOL> src_builder = [ '<STR_LIT>' , '<STR_LIT>' ] , <EOL> source_scanner = SourceFileScanner , <EOL> single_source = <NUM_LIT:1> ) <EOL> env [ '<STR_LIT>' ] [ '<STR_LIT>' ] = shared_obj <EOL> return ( static_obj , shared_obj ) <EOL> def createCFileBuilders ( env ) : <EOL> """<STR_LIT>""" <EOL> try : <EOL> c_file = env [ '<STR_LIT>' ] [ '<STR_LIT>' ] <EOL> except KeyError : <EOL> c_file = SCons . Builder . Builder ( action = { } , <EOL> emitter = { } , <EOL> suffix = { None : '<STR_LIT>' } ) <EOL> env [ '<STR_LIT>' ] [ '<STR_LIT>' ] = c_file <EOL> env . SetDefault ( CFILESUFFIX = '<STR_LIT>' ) <EOL> try : <EOL> cxx_file = env [ '<STR_LIT>' ] [ '<STR_LIT>' ] <EOL> except KeyError : <EOL> cxx_file = SCons . Builder . Builder ( action = { } , <EOL> emitter = { } , <EOL> suffix = { None : '<STR_LIT>' } ) <EOL> env [ '<STR_LIT>' ] [ '<STR_LIT>' ] = cxx_file <EOL> env . SetDefault ( CXXFILESUFFIX = '<STR_LIT>' ) <EOL> return ( c_file , cxx_file ) <EOL> def CreateJarBuilder ( env ) : <EOL> try : <EOL> java_jar = env [ '<STR_LIT>' ] [ '<STR_LIT>' ] <EOL> except KeyError : <EOL> fs = SCons . Node . FS . get_default_fs ( ) <EOL> jar_com = SCons . Action . Action ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> java_jar = SCons . Builder . Builder ( action = jar_com , <EOL> suffix = '<STR_LIT>' , <EOL> src_suffix = '<STR_LIT>' , <EOL> src_builder = '<STR_LIT>' , <EOL> source_factory = fs . Entry ) <EOL> env [ '<STR_LIT>' ] [ '<STR_LIT>' ] = java_jar <EOL> return java_jar <EOL> def CreateJavaHBuilder ( env ) : <EOL> try : <EOL> java_javah = env [ '<STR_LIT>' ] [ '<STR_LIT>' ] <EOL> except KeyError : <EOL> fs = SCons . Node . FS . get_default_fs ( ) <EOL> java_javah_com = SCons . Action . Action ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> java_javah = SCons . Builder . Builder ( action = java_javah_com , <EOL> src_suffix = '<STR_LIT>' , <EOL> target_factory = fs . Entry , <EOL> source_factory = fs . File , <EOL> src_builder = '<STR_LIT>' ) <EOL> env [ '<STR_LIT>' ] [ '<STR_LIT>' ] = java_javah <EOL> return java_javah <EOL> def CreateJavaClassFileBuilder ( env ) : <EOL> try : <EOL> java_class_file = env [ '<STR_LIT>' ] [ '<STR_LIT>' ] <EOL> except KeyError : <EOL> fs = SCons . Node . FS . get_default_fs ( ) <EOL> javac_com = SCons . Action . Action ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> java_class_file = SCons . Builder . Builder ( action = javac_com , <EOL> emitter = { } , <EOL> src_suffix = '<STR_LIT>' , <EOL> src_builder = [ '<STR_LIT>' ] , <EOL> target_factory = fs . Entry , <EOL> source_factory = fs . File ) <EOL> env [ '<STR_LIT>' ] [ '<STR_LIT>' ] = java_class_file <EOL> return java_class_file <EOL> def CreateJavaClassDirBuilder ( env ) : <EOL> try : <EOL> java_class_dir = env [ '<STR_LIT>' ] [ '<STR_LIT>' ] <EOL> except KeyError : <EOL> fs = SCons . Node . FS . get_default_fs ( ) <EOL> javac_com = SCons . Action . Action ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> java_class_dir = SCons . Builder . Builder ( action = javac_com , <EOL> emitter = { } , <EOL> target_factory = fs . Dir , <EOL> source_factory = fs . Dir ) <EOL> env [ '<STR_LIT>' ] [ '<STR_LIT>' ] = java_class_dir <EOL> return java_class_dir <EOL> def CreateJavaFileBuilder ( env ) : <EOL> try : <EOL> java_file = env [ '<STR_LIT>' ] [ '<STR_LIT>' ] <EOL> except KeyError : <EOL> java_file = SCons . Builder . Builder ( action = { } , <EOL> emitter = { } , <EOL> suffix = { None : '<STR_LIT>' } ) <EOL> env [ '<STR_LIT>' ] [ '<STR_LIT>' ] = java_file <EOL> env [ '<STR_LIT>' ] = '<STR_LIT>' <EOL> return java_file <EOL> class ToolInitializerMethod ( object ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , name , initializer ) : <EOL> """<STR_LIT>""" <EOL> self . __name__ = name <EOL> self . initializer = initializer <EOL> def get_builder ( self , env ) : <EOL> """<STR_LIT>""" <EOL> builder = getattr ( env , self . __name__ ) <EOL> self . initializer . apply_tools ( env ) <EOL> builder = getattr ( env , self . __name__ ) <EOL> if builder is self : <EOL> return None <EOL> self . initializer . remove_methods ( env ) <EOL> return builder <EOL> def __call__ ( self , env , * args , ** kw ) : <EOL> """<STR_LIT:U+0020>""" <EOL> builder = self . get_builder ( env ) <EOL> if builder is None : <EOL> return [ ] , [ ] <EOL> return builder ( * args , ** kw ) <EOL> class ToolInitializer ( object ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , env , tools , names ) : <EOL> if not SCons . Util . is_List ( tools ) : <EOL> tools = [ tools ] <EOL> if not SCons . Util . is_List ( names ) : <EOL> names = [ names ] <EOL> self . env = env <EOL> self . tools = tools <EOL> self . names = names <EOL> self . methods = { } <EOL> for name in names : <EOL> method = ToolInitializerMethod ( name , self ) <EOL> self . methods [ name ] = method <EOL> env . AddMethod ( method ) <EOL> def remove_methods ( self , env ) : <EOL> """<STR_LIT>""" <EOL> for method in self . methods . values ( ) : <EOL> env . RemoveMethod ( method ) <EOL> def apply_tools ( self , env ) : <EOL> """<STR_LIT>""" <EOL> for t in self . tools : <EOL> tool = SCons . Tool . Tool ( t ) <EOL> if tool . exists ( env ) : <EOL> env . Tool ( tool ) <EOL> return <EOL> def Initializers ( env ) : <EOL> ToolInitializer ( env , [ '<STR_LIT>' ] , [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] ) <EOL> def Install ( self , * args , ** kw ) : <EOL> return self . _InternalInstall ( * args , ** kw ) <EOL> def InstallAs ( self , * args , ** kw ) : <EOL> return self . _InternalInstallAs ( * args , ** kw ) <EOL> def InstallVersionedLib ( self , * args , ** kw ) : <EOL> return self . _InternalInstallVersionedLib ( * args , ** kw ) <EOL> env . AddMethod ( Install ) <EOL> env . AddMethod ( InstallAs ) <EOL> env . AddMethod ( InstallVersionedLib ) <EOL> def FindTool ( tools , env ) : <EOL> for tool in tools : <EOL> t = Tool ( tool ) <EOL> if t . exists ( env ) : <EOL> return tool <EOL> return None <EOL> def FindAllTools ( tools , env ) : <EOL> def ToolExists ( tool , env = env ) : <EOL> return Tool ( tool ) . exists ( env ) <EOL> return list ( filter ( ToolExists , tools ) ) <EOL> def tool_list ( platform , env ) : <EOL> other_plat_tools = [ ] <EOL> if str ( platform ) == '<STR_LIT:win32>' : <EOL> "<STR_LIT>" <EOL> linkers = [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> c_compilers = [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> cxx_compilers = [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> assemblers = [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> fortran_compilers = [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> ars = [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> other_plat_tools = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> elif str ( platform ) == '<STR_LIT>' : <EOL> "<STR_LIT>" <EOL> linkers = [ '<STR_LIT>' , '<STR_LIT>' , ] <EOL> c_compilers = [ '<STR_LIT>' , '<STR_LIT>' , ] <EOL> cxx_compilers = [ '<STR_LIT>' , '<STR_LIT>' , ] <EOL> assemblers = [ '<STR_LIT>' , ] <EOL> fortran_compilers = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> ars = [ '<STR_LIT>' , ] <EOL> elif str ( platform ) == '<STR_LIT>' : <EOL> "<STR_LIT>" <EOL> linkers = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> c_compilers = [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> cxx_compilers = [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> assemblers = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> fortran_compilers = [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> ars = [ '<STR_LIT>' ] <EOL> elif str ( platform ) == '<STR_LIT>' : <EOL> "<STR_LIT>" <EOL> linkers = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> c_compilers = [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> cxx_compilers = [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> assemblers = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> fortran_compilers = [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> ars = [ '<STR_LIT>' ] <EOL> elif str ( platform ) == '<STR_LIT>' : <EOL> "<STR_LIT>" <EOL> linkers = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> c_compilers = [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> cxx_compilers = [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> assemblers = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> fortran_compilers = [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> ars = [ '<STR_LIT>' ] <EOL> elif str ( platform ) == '<STR_LIT>' : <EOL> "<STR_LIT>" <EOL> linkers = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> c_compilers = [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> cxx_compilers = [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> assemblers = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> fortran_compilers = [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> elif str ( platform ) == '<STR_LIT>' : <EOL> "<STR_LIT>" <EOL> linkers = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> c_compilers = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> cxx_compilers = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> assemblers = [ '<STR_LIT>' ] <EOL> fortran_compilers = [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> ars = [ '<STR_LIT>' ] <EOL> elif str ( platform ) == '<STR_LIT>' : <EOL> "<STR_LIT>" <EOL> linkers = [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> c_compilers = [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> cxx_compilers = [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> assemblers = [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> ars = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> else : <EOL> "<STR_LIT>" <EOL> linkers = [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> c_compilers = [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> cxx_compilers = [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> assemblers = [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> ars = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> c_compiler = FindTool ( c_compilers , env ) or c_compilers [ <NUM_LIT:0> ] <EOL> if c_compiler and c_compiler == '<STR_LIT>' : <EOL> cxx_compiler = None <EOL> linker = None <EOL> assembler = None <EOL> ar = None <EOL> else : <EOL> if c_compiler in ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) : <EOL> cxx_compiler = None <EOL> else : <EOL> cxx_compiler = FindTool ( cxx_compilers , env ) or cxx_compilers [ <NUM_LIT:0> ] <EOL> linker = FindTool ( linkers , env ) or linkers [ <NUM_LIT:0> ] <EOL> assembler = FindTool ( assemblers , env ) or assemblers [ <NUM_LIT:0> ] <EOL> ar = FindTool ( ars , env ) or ars [ <NUM_LIT:0> ] <EOL> tools = [ linker , c_compiler , cxx_compiler , <EOL> assembler , ar ] <EOL> return [ x for x in tools if x ] </s>
