native_client_sdk/src/tools/create_nmf.py
def GetNeeded(self):
    """Collect the list of dependencies for the main_files

    Returns:
      A dict with key=filename and value=ArchFile of input files.
          Includes the input files as well, with arch filled in if absent.
          Example: { '/path/to/my.nexe': ArchFile(my.nexe),
                     '/path/to/libfoo.so': ArchFile(libfoo.so) }"""

    if self.needed:
      return self.needed

    DebugPrint('GetNeeded(%s)' % self.main_files)

    if not self.objdump:
      self.objdump = FindObjdumpExecutable()

    try:
      all_files = get_shared_deps.GetNeeded(self.main_files, self.objdump,
                                            self.lib_path)
    except get_shared_deps.NoObjdumpError:
      raise Error('No objdump executable found (see --help for more info)')
    except get_shared_deps.Error as e:
      raise Error(str(e))

    self.needed = {}

    # all_files is a dictionary mapping filename to architecture. self.needed
    # should be a dictionary of filename to ArchFile.
    for filename, arch in all_files.items():
      name = os.path.basename(filename)
      self.needed[filename] = ArchFile(name=name, path=filename, arch=arch)

    self._SetArchFileUrls()

    return self.needed
Collect the list of dependencies for the main_files

    Returns:
      A dict with key=filename and value=ArchFile of input files.
          Includes the input files as well, with arch filled in if absent.
          Example: { '/path/to/my.nexe': ArchFile(my.nexe),
                     '/path/to/libfoo.so': ArchFile(libfoo.so) }
Collect the list of dependencies for the main_files
Collect the list of dependencies for the main_files
def GetNeeded(self):
    if self.needed:
      return self.needed
    DebugPrint('GetNeeded(%s)' % self.main_files)
    if not self.objdump:
      self.objdump = FindObjdumpExecutable()
    try:
      all_files = get_shared_deps.GetNeeded(self.main_files, self.objdump,
                                            self.lib_path)
    except get_shared_deps.NoObjdumpError:
      raise Error('No objdump executable found (see --help for more info)')
    except get_shared_deps.Error as e:
      raise Error(str(e))
    self.needed = {}
    for filename, arch in all_files.items():
      name = os.path.basename(filename)
      self.needed[filename] = ArchFile(name=name, path=filename, arch=arch)
    self._SetArchFileUrls()
    return self.needed
def GetNeeded ( self ) : if self . needed : return self . needed DebugPrint ( 'GetNeeded(%s)' % self . main_files ) if not self . objdump : self . objdump = FindObjdumpExecutable ( ) try : all_files = get_shared_deps . GetNeeded ( self . main_files , self . objdump , self . lib_path ) except get_shared_deps . NoObjdumpError : raise Error ( 'No objdump executable found (see --help for more info)' ) except get_shared_deps . Error as e : raise Error ( str ( e ) ) self . needed = { } for filename , arch in all_files . items ( ) : name = os . path . basename ( filename ) self . needed [ filename ] = ArchFile ( name = name , path = filename , arch = arch ) self . _SetArchFileUrls ( ) return self . needed
Collect the list of dependencies for the main_files
Collect the list of dependencies for the main_files
"""Collect the list of dependencies for the main_files

    Returns:
      A dict with key=filename and value=ArchFile of input files.
          Includes the input files as well, with arch filled in if absent.
          Example: { '/path/to/my.nexe': ArchFile(my.nexe),
                     '/path/to/libfoo.so': ArchFile(libfoo.so) }""" # all_files is a dictionary mapping filename to architecture. self.needed # should be a dictionary of filename to ArchFile.
A dict with key=filename and value=ArchFile of input files.
Includes the input files as well, with arch filled in if absent.
Example: { '/path/to/my.nexe': ArchFile(my.nexe),
'/path/to/libfoo.so': ArchFile(libfoo.so) }
A dict with key = filename and value = ArchFile of input files . Includes the input files as well with arch filled in if absent . Example : { ' / path / to / my . nexe ' : ArchFile ( my . nexe ) ' / path / to / libfoo . so ' : ArchFile ( libfoo . so ) }
self