コード例 #1
0
ファイル: target.py プロジェクト: foursquare/pants
  def default_sources(cls, sources_rel_path):
    """Provide sources, if they weren't specified explicitly in the BUILD file.

    By default this globs over self.default_sources_globs (e.g., '*.java')
    but subclasses can override to provide more nuanced default behavior.
    In this case, the subclasses must also override supports_default_sources().
    """
    if cls.default_sources_globs is not None:
      if cls.default_sources_exclude_globs is not None:
        exclude = [Globs.create_fileset_with_spec(sources_rel_path,
                                                  *maybe_list(cls.default_sources_exclude_globs))]
      else:
        exclude = []
      return Globs.create_fileset_with_spec(sources_rel_path,
                                            *maybe_list(cls.default_sources_globs),
                                            exclude=exclude)
    return None
コード例 #2
0
 def sources(self, rel_path, *args):
   return Globs.create_fileset_with_spec(rel_path, *args)
コード例 #3
0
ファイル: test_files.py プロジェクト: benjyw/pants
 def sources(rel_path, *globs):
   return Globs.create_fileset_with_spec(rel_path, *globs)
コード例 #4
0
ファイル: test_target.py プロジェクト: tpasternak/pants
 def sources(rel_path, *args):
     return Globs.create_fileset_with_spec(rel_path, *args)
コード例 #5
0
ファイル: test_jvm_app.py プロジェクト: zvikihouzz/pants
def _globs(rel_path):
    pc = ParseContext(rel_path=rel_path, type_aliases={})
    return Globs(pc)