当前位置: 首页>>代码示例>>Python>>正文


Python Target.resolve_all方法代码示例

本文整理汇总了Python中twitter.pants.base.target.Target.resolve_all方法的典型用法代码示例。如果您正苦于以下问题:Python Target.resolve_all方法的具体用法?Python Target.resolve_all怎么用?Python Target.resolve_all使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在twitter.pants.base.target.Target的用法示例。


在下文中一共展示了Target.resolve_all方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: java_sources

# 需要导入模块: from twitter.pants.base.target import Target [as 别名]
# 或者: from twitter.pants.base.target.Target import resolve_all [as 别名]
  def java_sources(self):
    if self._raw_java_sources is not None:
      self._java_sources = list(Target.resolve_all(maybe_list(self._raw_java_sources, Target),
                                                   JavaLibrary))

      self._raw_java_sources = None

      # TODO(John Sirois): reconsider doing this auto-linking.
      # We have circular java/scala dep, add an inbound dependency edge from java to scala in this
      # case to force scala compilation to precede java - since scalac supports generating java
      # stubs for these cycles and javac does not this is both necessary and always correct.
      for java_target in self._java_sources:
        java_target.update_dependencies([self])
    return self._java_sources
开发者ID:FernandoG26,项目名称:commons,代码行数:16,代码来源:scala_library.py

示例2: _resolve_target_sources

# 需要导入模块: from twitter.pants.base.target import Target [as 别名]
# 或者: from twitter.pants.base.target.Target import resolve_all [as 别名]
  def _resolve_target_sources(self, target_sources, extension=None, relative_to_target_base=False):
    """Given a list of pants targets, extract their sources as a list.

    Filters against the extension if given and optionally returns the paths relative to the target
    base.
    """
    resolved_sources = []
    for resolved in Target.resolve_all(target_sources):
      if hasattr(resolved, 'sources'):
        resolved_sources.extend(
          source if relative_to_target_base else os.path.join(resolved.target_base, source)
          for source in resolved.sources if not extension or source.endswith(extension)
        )
    return resolved_sources
开发者ID:CodeWarltz,项目名称:commons,代码行数:16,代码来源:jvm_compile.py


注:本文中的twitter.pants.base.target.Target.resolve_all方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。