Beispiel #1
0
  def __init__(self,
               name,
               sources,
               dependencies = None,
               excludes = None,
               buildflags = None,
               is_meta = False):

    """name: The name of this module target, addressable via pants via the portion of the spec
        following the colon
    sources: A list of paths containing the scala source files this modules tests are compiled from
    provides: An optional Dependency object indicating the The ivy artifact to export
    dependencies: An optional list of Dependency objects specifying the binary (jar) dependencies of
        this module.
    excludes: An optional list of dependency exclude patterns to filter all of this module's
        transitive dependencies against.
    buildflags: A list of additional command line arguments to pass to the underlying build system
        for this target"""

    JvmTarget.__init__(self,
                       'tests/scala',
                       name,
                       sources,
                       dependencies,
                       excludes,
                       buildflags,
                       is_meta)
Beispiel #2
0
  def __init__(self,
               name,
               sources,
               dependencies = None,
               excludes = None,
               buildflags = None,
               is_meta = False):

    """name: The name of this module target, addressable via pants via the portion of the spec
        following the colon
    sources: A list of paths containing the scala source files this modules tests are compiled from
    provides: An optional Dependency object indicating the The ivy artifact to export
    dependencies: An optional list of Dependency objects specifying the binary (jar) dependencies of
        this module.
    excludes: An optional list of dependency exclude patterns to filter all of this module's
        transitive dependencies against.
    buildflags: A list of additional command line arguments to pass to the underlying build system
        for this target"""

    def get_all_deps():
      all_deps = OrderedSet()
      all_deps.update(Pants('src/scala/com/twitter/common/testing:explicit-specs-runner').resolve())
      all_deps.update(Pants('3rdparty:scala-library').resolve())
      if dependencies:
        all_deps.update(dependencies)
      return all_deps

    JvmTarget.__init__(self,
                        'tests/scala',
                        name,
                        sources,
                        get_all_deps(),
                        excludes,
                        buildflags,
                        is_meta)
Beispiel #3
0
  def __init__(self, name, main, source=None, dependencies=None, excludes=None):
    JvmTarget.__init__(self,
                       name=name,
                       sources=[source] if source else None,
                       dependencies=dependencies,
                       excludes=excludes)

    if not isinstance(main, basestring):
      raise TargetDefinitionException(self, 'main must be a fully qualified classname')

    if source and not isinstance(source, basestring):
      raise TargetDefinitionException(self, 'source must be a single relative file path')

    self.main = main
  def __init__(self,
               name,
               sources,
               provides = None,
               dependencies = None,
               excludes = None,
               buildflags = None,
               is_meta = False):

    # it's critical provides is set 1st since _provides() is called elsewhere in the constructor
    # flow
    self.provides = provides

    JvmTarget.__init__(self, name, sources, dependencies, excludes, buildflags, is_meta)
Beispiel #5
0
    def __init__(self,
                 name,
                 sources,
                 dependencies=None,
                 excludes=None,
                 buildflags=None,
                 is_meta=False):
        """name: The name of this module target, addressable via pants via the portion of the spec
        following the colon
    sources: A list of paths containing the scala source files this modules tests are compiled from
    provides: An optional Dependency object indicating the The ivy artifact to export
    dependencies: An optional list of Dependency objects specifying the binary (jar) dependencies of
        this module.
    excludes: An optional list of dependency exclude patterns to filter all of this module's
        transitive dependencies against.
    buildflags: A list of additional command line arguments to pass to the underlying build system
        for this target"""

        JvmTarget.__init__(self, 'tests/scala', name, sources, dependencies,
                           excludes, buildflags, is_meta)