예제 #1
0
파일: filemap.py 프로젝트: online/commons
 def execute(self):
     for buildfile in BuildFile.scan_buildfiles(self.root_dir):
         for address in Target.get_all_addresses(buildfile):
             target = Target.get(address)
             if hasattr(target, 'sources'):
                 for sourcefile in target.sources:
                     print sourcefile, address
예제 #2
0
파일: filemap.py 프로젝트: collude/collude
 def execute(self):
   for buildfile in BuildFile.scan_buildfiles(self.root_dir):
     for address in Target.get_all_addresses(buildfile):
       target = Target.get(address)
       if hasattr(target, 'sources'):
         for sourcefile in target.sources:
           print sourcefile, address
예제 #3
0
def scan_addresses(root_dir, base_path=None):
    """Parses all targets available in BUILD files under base_path and returns their addresses.  If no
  base_path is specified, root_dir is assumed to be the base_path"""

    addresses = OrderedSet()
    for buildfile in BuildFile.scan_buildfiles(root_dir, base_path):
        addresses.update(Target.get_all_addresses(buildfile))
    return addresses
예제 #4
0
파일: util.py 프로젝트: collude/collude
def scan_addresses(root_dir, base_path = None):
  """Parses all targets available in BUILD files under base_path and returns their addresses.  If no
  base_path is specified, root_dir is assumed to be the base_path"""

  addresses = OrderedSet()
  for buildfile in BuildFile.scan_buildfiles(root_dir, base_path):
    addresses.update(Target.get_all_addresses(buildfile))
  return addresses
예제 #5
0
파일: list.py 프로젝트: jaxlaw/commons
 def _parse_buildfiles(self):
   buildfiles = OrderedSet()
   for spec in self.args:
     try:
       if self.options.is_directory_list:
         for buildfile in BuildFile.scan_buildfiles(self.root_dir, spec):
           buildfiles.add(buildfile)
       else:
         buildfiles.add(Address.parse(self.root_dir, spec).buildfile)
     except:
       self.error("Problem parsing spec %s: %s" % (spec, traceback.format_exc()))
   return buildfiles
예제 #6
0
파일: list.py 프로젝트: collude/collude
 def _parse_buildfiles(self):
   buildfiles = OrderedSet()
   for spec in self.args:
     try:
       if self.options.is_directory_list:
         for buildfile in BuildFile.scan_buildfiles(self.root_dir, spec):
           buildfiles.add(buildfile)
       else:
         buildfiles.add(Address.parse(self.root_dir, spec).buildfile)
     except:
       self.error("Problem parsing spec %s: %s" % (spec, traceback.format_exc()))
   return buildfiles
예제 #7
0
파일: list.py 프로젝트: jaxlaw/commons
  def __init__(self, root_dir, parser, argv):
    Command.__init__(self, root_dir, parser, argv)

    self.buildfiles = self._parse_buildfiles() if self.args else BuildFile.scan_buildfiles(root_dir)
예제 #8
0
    def __init__(self, root_dir, parser, argv):
        Command.__init__(self, root_dir, parser, argv)

        self.buildfiles = self._parse_buildfiles(
        ) if self.args else BuildFile.scan_buildfiles(root_dir)