Module ImportFrom alias alias alias alias alias alias alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias alias alias ImportFrom alias ImportFrom alias ClassDef bases NameLoad NameLoad body FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Assign AttributeStore NameLoad attr BoolOpOr NameLoad Call NameLoad If UnaryOpNot Call NameLoad NameLoad NameLoad body Raise Call NameLoad Call AttributeLoad Str attr NameLoad TryExcept body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type AttributeLoad NameLoad attr name NameStore body Raise Call NameLoad Call AttributeLoad Str attr keyword NameLoad keyword NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Dict Str Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad NameLoad attr decorator_list NameLoad decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Return Call AttributeLoad Str attr AttributeLoad AttributeLoad NameLoad attr attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Expr Str Assert BoolOpAnd NameLoad Call NameLoad NameLoad NameLoad Str Expr Call AttributeLoad Call NameLoad AttributeLoad NameLoad attr NameLoad attr Call AttributeLoad Str attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad NameLoad attr decorator_list NameLoad decorator_list Assign NameStore Str Expr Str Assign NameStore Str Expr Str Assign NameStore Str Expr Str Assign NameStore Str Expr Str Assign NameStore Str Expr Str Assign NameStore Call NameLoad TupleLoad NameLoad NameLoad NameLoad NameLoad NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareNotIn NameLoad AttributeLoad NameLoad attr body Raise Call NameLoad Call AttributeLoad Str attr keyword AttributeLoad NameLoad attr keyword NameLoad Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr Dict Str Call NameLoad Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad AttributeLoad NameLoad attr attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Return Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Return Call AttributeLoad Str attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Assign NameStore Call AttributeLoad NameLoad attr BoolOpOr NameLoad AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad keyword TupleLoad NameLoad NameLoad Assign NameStore ListLoad Call NameLoad Str Call NameLoad Str Call NameLoad Str Call NameLoad Str Call NameLoad Str AttributeLoad NameLoad attr Return Call NameLoad keyword BinOpAdd NameLoad NameLoad keyword NameLoad decorator_list NameLoad Assign NameStore NameLoad FunctionDef arguments args NameParam defaults body Expr Str If CompareIs AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str If UnaryOpNot Call NameLoad NameLoad NameLoad body Raise Call NameLoad Str Assign AttributeStore NameLoad attr NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad AttributeLoad NameLoad attr body Expr Str Assign AttributeStore NameLoad attr Call NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Dict Str Call NameLoad Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad NameLoad keyword NameLoad keyword Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad AttributeLoad NameLoad attr attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Return Call NameLoad AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr For NameStore AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Return Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list NameLoad decorator_list ClassDef bases NameLoad body Expr Str ClassDef bases NameLoad body Pass decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Assign AttributeStore NameLoad attr Call NameLoad If NameLoad body If UnaryOpNot Call NameLoad NameLoad NameLoad body Raise Call AttributeLoad NameLoad attr Str For NameStore Call AttributeLoad NameLoad attr body If UnaryOpNot Call NameLoad NameLoad NameLoad body Raise Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad AttributeLoad Call NameLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Dict Str Call NameLoad BoolOpOr NameLoad Dict decorator_list FunctionDef arguments args NameParam defaults body Return Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Return AttributeLoad AttributeLoad NameLoad attr attr decorator_list NameLoad decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad kwarg body Expr Str Assign AttributeStore NameLoad attr NameLoad If BoolOpAnd NameLoad UnaryOpNot Call NameLoad NameLoad NameLoad body Raise Call NameLoad NameLoad Str If BoolOpAnd NameLoad UnaryOpNot Call NameLoad NameLoad NameLoad body Raise Call NameLoad NameLoad Str If BoolOpAnd NameLoad UnaryOpNot Call NameLoad NameLoad NameLoad body Raise Call NameLoad NameLoad Call AttributeLoad Str attr AttributeLoad Call NameLoad NameLoad attr If BoolOpAnd NameLoad UnaryOpNot Call NameLoad NameLoad NameLoad body Raise Call NameLoad NameLoad Call AttributeLoad Str attr AttributeLoad Call NameLoad NameLoad attr Assign NameStore IfExp NameLoad ListLoad NameLoad NameLoad If CompareIn Str NameLoad body Raise Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Assign NameStore BoolOpOr NameLoad Call NameLoad Expr Call AttributeLoad NameLoad attr Dict Str Str Str Str Str Str Call NameLoad BoolOpOr NameLoad NameLoad Call NameLoad Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword Str Call NameLoad BoolOpOr NameLoad Call AttributeLoad NameLoad attr Call NameLoad Call NameLoad NameLoad Call NameLoad NameLoad Call NameLoad BoolOpOr NameLoad TupleLoad Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad keyword Call AttributeLoad NameLoad attr NameLoad keyword Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return AttributeLoad AttributeLoad NameLoad attr attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Return AttributeLoad AttributeLoad NameLoad attr attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Return AttributeLoad AttributeLoad NameLoad attr attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Return AttributeLoad AttributeLoad NameLoad attr attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Return AttributeLoad AttributeLoad NameLoad attr attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Return AttributeLoad AttributeLoad NameLoad attr attr decorator_list NameLoad decorator_list
N/A __future__ absolute_import division generators nested_scopes print_function unicode_literals with_statement N/A re hashlib sha1 six string_types pants.backend.jvm.targets.exclude Exclude pants.backend.jvm.targets.jvm_target JvmTarget pants.base.exceptions TargetDefinitionException pants.base.payload Payload pants.base.payload_field ExcludesField FingerprintedField FingerprintedMixin PrimitiveField pants.base.validation assert_list pants.util.meta AbstractClass JarRule N/A FingerprintedMixin AbstractClass N/A __init__ N/A N/A self apply_pattern payload N/A None N/A N/A N/A self payload N/A payload N/A Payload N/A N/A N/A isinstance apply_pattern string_types N/A N/A N/A ValueError N/A N/A The supplied apply_pattern is not a string, given: {} format apply_pattern N/A N/A N/A N/A self _apply_pattern N/A N/A re compile apply_pattern N/A N/A N/A N/A re error N/A e N/A N/A N/A ValueError N/A N/A The supplied apply_pattern: {pattern} is not a valid regular expression: {msg} format pattern apply_pattern msg e N/A N/A N/A N/A self payload add_fields N/A apply_pattern N/A PrimitiveField apply_pattern N/A fingerprint N/A N/A self N/A N/A N/A N/A N/A N/A self payload fingerprint N/A apply_pattern N/A N/A self N/A N/A N/A The pattern that matches jar entry paths this rule applies to.

    :rtype: re.RegexObject
     N/A N/A self _apply_pattern N/A property N/A Skip N/A JarRule N/A N/A A rule that skips adding matched entries to a jar. __repr__ N/A N/A self N/A N/A N/A N/A N/A Skip(apply_pattern={}) format N/A N/A self payload apply_pattern N/A N/A Duplicate N/A JarRule N/A N/A A rule that indicates how duplicate entries should be handled when building a jar. Error N/A Exception N/A N/A Raised by the ``FAIL`` action when a duplicate entry is encountered __init__ N/A N/A self path N/A N/A N/A Creates a duplicate entry error for the given path.

      :param string path: The path of the duplicate entry.
       N/A N/A path N/A isinstance path string_types A non-empty path must be supplied. N/A N/A N/A N/A super N/A Duplicate Error self __init__ N/A N/A Duplicate entry encountered for path {} format path N/A N/A self _path path N/A path N/A N/A self N/A N/A N/A The path of the duplicate entry. N/A N/A self _path N/A property N/A N/A SKIP SKIP N/A Retains the 1st entry and skips subsequent duplicates. N/A REPLACE REPLACE N/A Retains the most recent entry and skips prior duplicates. N/A CONCAT CONCAT N/A Concatenates the contents of all duplicate entries encountered in the order encountered. N/A CONCAT_TEXT CONCAT_TEXT N/A Concatenates the contents of all duplicate entries encountered in the order encountered,
  separating entries with newlines if needed.
   N/A FAIL FAIL N/A Raises a :class:``Duplicate.Error`` when a duplicate entry is
  encountered.
   N/A _VALID_ACTIONS N/A frozenset N/A SKIP REPLACE CONCAT CONCAT_TEXT FAIL validate_action N/A N/A cls action N/A N/A N/A Verifies the given action is a valid duplicate jar rule action.

    :returns: The action if it is valid.
    :raises: ``ValueError`` if the action is invalid.
     N/A N/A action N/A cls _VALID_ACTIONS N/A N/A N/A ValueError N/A N/A The supplied action must be one of {valid}, given: {given} format valid N/A cls _VALID_ACTIONS given action N/A action N/A classmethod __init__ N/A N/A self apply_pattern action N/A N/A N/A Creates a rule for handling duplicate jar entries.

    :param string apply_pattern: A regular expression that matches duplicate jar entries this rule
      applies to.
    :param action: An action to take to handle one or more duplicate entries.  Must be one of:
      ``Duplicate.SKIP``, ``Duplicate.REPLACE``, ``Duplicate.CONCAT``, ``Duplicate.CONCAT_TEXT``,
      or ``Duplicate.FAIL``.
     N/A payload N/A Payload N/A N/A N/A payload add_fields N/A action N/A PrimitiveField N/A N/A self validate_action action N/A N/A N/A N/A super Duplicate self __init__ apply_pattern payload payload N/A action N/A N/A self N/A N/A N/A The action to take for any duplicate entries that match this rule's ``apply_pattern``. N/A N/A N/A self payload action N/A property fingerprint N/A N/A self N/A N/A N/A N/A N/A N/A self payload fingerprint N/A __repr__ N/A N/A self N/A N/A N/A N/A N/A Duplicate(apply_pattern={0}, action={1}) format N/A N/A self payload apply_pattern N/A N/A self payload action N/A N/A JarRules N/A FingerprintedMixin N/A N/A A set of rules for packaging up a deploy jar.

  Deploy jars are executable jars with fully self-contained classpaths and as such, assembling them
  presents problems given jar semantics.

  One issue is signed jars that must be included on the
  classpath.  These have a signature that depends on the jar contents and assembly of the deploy jar
  changes the content of the jar, breaking the signatures.  For cases like these the signed jars
  must be verified and then the signature information thrown away.  The `Skip <#Skip>`_
  rule supports this sort of issue by allowing outright entry exclusion in the final deploy jar.

  Another issue is duplicate jar entries.  Although the underlying zip format supports these, the
  java jar tool and libraries do not.  As such some action must be taken for each duplicate entry
  such that there are no duplicates in the final deploy jar.  The four
  `Duplicate <#Duplicate>`_ rules support resolution of these cases by allowing 1st wins,
  last wins, concatenation of the duplicate entry contents or raising an exception.

  :API: public
   skip_signatures_and_duplicates_concat_well_known_metadata N/A N/A cls default_dup_action additional_rules N/A None None N/A N/A Produces a rule set useful in many deploy jar creation contexts.

    The rule set skips duplicate entries by default, retaining the 1st encountered.  In addition it
    has the following special handling:

    - jar signature metadata is dropped
    - jar indexing files INDEX.LIST are dropped
    - ``java.util.ServiceLoader`` provider-configuration files are concatenated in the order
      encountered

    :param default_dup_action: An optional default action to take for duplicates.  Defaults to
      `Duplicate.SKIP` if not specified.
    :param additional_rules: Optionally one or more jar rules to add to those described above.
    :returns: JarRules
     N/A default_dup_action N/A N/A Duplicate validate_action N/A default_dup_action N/A Duplicate SKIP N/A additional_rules N/A assert_list additional_rules expected_type N/A Duplicate Skip N/A rules N/A N/A Skip ^META-INF/[^/]+\.SF$ N/A Skip ^META-INF/[^/]+\.DSA$ N/A Skip ^META-INF/[^/]+\.RSA$ N/A Skip ^META-INF/INDEX.LIST$ N/A Duplicate ^META-INF/services/ N/A Duplicate CONCAT_TEXT N/A N/A JarRules rules N/A rules additional_rules default_dup_action default_dup_action N/A classmethod N/A _DEFAULT None default N/A N/A cls N/A N/A N/A Returns the default set of jar rules.

    Can be set with `set_default` but otherwise defaults to
    `skip_signatures_and_duplicates_concat_well_known_metadata`.

    :API: public
     N/A N/A N/A cls _DEFAULT None N/A N/A N/A cls _DEFAULT N/A N/A cls skip_signatures_and_duplicates_concat_well_known_metadata N/A N/A cls _DEFAULT N/A classmethod set_default N/A N/A cls rules N/A N/A N/A Sets the default site-wide jar rules. N/A N/A N/A isinstance rules JarRules N/A N/A N/A ValueError The default rules must be a JarRules instance. N/A N/A cls _DEFAULT rules N/A classmethod __init__ N/A N/A self rules default_dup_action N/A None N/A Duplicate SKIP N/A N/A Creates a new set of jar rules with the default duplicate action of ``Duplicate.SKIP``.

    :param rules: One or more rules that will be applied in order to jar entries being packaged in
      a deploy jar. `Skip <#Skip>`_ rules can go here.
    :param default_dup_action: The default action to take when a duplicate entry is encountered and
      no explicit rules apply to the entry.
     N/A N/A self payload N/A Payload N/A N/A N/A N/A self payload add_fields N/A default_dup_action N/A PrimitiveField N/A N/A Duplicate validate_action default_dup_action N/A N/A self _rules N/A assert_list rules expected_type JarRule key_arg rules N/A default_dup_action N/A N/A self N/A N/A N/A The default action to take when a duplicate jar entry is encountered.

    :API: public
     N/A N/A N/A self payload default_dup_action N/A property rules N/A N/A self N/A N/A N/A A copy of the list of explicit entry rules in effect. N/A N/A list N/A self _rules N/A property fingerprint N/A N/A self N/A N/A N/A hasher N/A sha1 N/A N/A N/A hasher update N/A N/A N/A self payload fingerprint N/A rule N/A self rules N/A N/A N/A N/A hasher update N/A N/A rule fingerprint N/A N/A N/A hasher hexdigest N/A value N/A N/A self N/A N/A N/A N/A self _jar_rules N/A property N/A ManifestEntries N/A FingerprintedMixin N/A N/A Describes additional items to add to the app manifest. ExpectedDictionaryError N/A Exception N/A N/A N/A __init__ N/A N/A self entries N/A None N/A N/A 
    :param entries: Additional headers, value pairs to add to the MANIFEST.MF.
      You can just add fixed string header / value pairs.
    :type entries: dictionary of string : string
     N/A N/A self payload N/A Payload N/A entries N/A N/A N/A N/A isinstance entries dict N/A N/A N/A N/A self ExpectedDictionaryError entries must be a dictionary of strings. N/A key N/A N/A entries keys N/A N/A N/A N/A isinstance key string_types N/A N/A N/A N/A self ExpectedDictionaryError N/A N/A entries must be dictionary of strings, got key {} type {} format key N/A N/A type key __name__ N/A N/A N/A N/A self payload add_fields N/A entries N/A PrimitiveField N/A entries N/A N/A fingerprint N/A N/A self N/A N/A N/A N/A N/A N/A self payload fingerprint N/A entries N/A N/A self N/A N/A N/A N/A N/A self payload entries N/A property N/A JvmBinary N/A JvmTarget N/A N/A A JVM binary.

  Below are a summary of how key goals affect targets of this type:

  * ``bundle`` - Creates a self-contained directory with the binary and all
    its dependencies, optionally archived, suitable for deployment.
  * ``binary`` - Create an executable jar of the binary. On the JVM
    this means the jar has a manifest specifying the main class.
  * ``run`` - Executes the main class of this binary locally.

  :API: public
   __init__ N/A N/A self name address payload main basename source deploy_excludes deploy_jar_rules manifest_entries shading_rules N/A None None None None None None None None None None kwargs N/A N/A 
    :API: public

    :param string main: The name of the ``main`` class, e.g.,
      ``'org.pantsbuild.example.hello.main.HelloMain'``. This class may be
      present as the source of this target or depended-upon library.
    :param string basename: Base name for the generated ``.jar`` file, e.g.,
      ``'hello'``. (By default, uses ``name`` param)  Note this is unsafe
      because of the possible conflict when multiple binaries are built.
    :param string source: Name of one ``.java`` or ``.scala`` file (a good
      place for a ``main``).
    :param dependencies: Targets (probably ``java_library`` and
     ``scala_library`` targets) to "link" in.
    :type dependencies: list of target specs
    :param deploy_excludes: List of `exclude <#exclude>`_\s to apply
      at deploy time.
      If you, for example, deploy a java servlet that has one version of
      ``servlet.jar`` onto a Tomcat environment that provides another version,
      they might conflict. ``deploy_excludes`` gives you a way to build your
      code but exclude the conflicting ``jar`` when deploying.
    :param deploy_jar_rules: `Jar rules <#jar_rules>`_ for packaging this binary in a
      deploy jar.
    :param manifest_entries: dict that specifies entries for `ManifestEntries <#manifest_entries>`_
      for adding to MANIFEST.MF when packaging this binary.
    :param list shading_rules: Optional list of shading rules to apply when building a shaded
      (aka monolithic aka fat) binary jar. The order of the rules matters: the first rule which
      matches a fully-qualified class name is used to shade it. See shading_relocate(),
      shading_exclude(), shading_relocate_package(), and shading_exclude_package().
     N/A N/A self address address N/A N/A main N/A N/A isinstance main string_types N/A N/A N/A TargetDefinitionException self main must be a fully qualified classname N/A N/A source N/A N/A isinstance source string_types N/A N/A N/A TargetDefinitionException self source must be a single relative file path N/A N/A deploy_jar_rules N/A N/A isinstance deploy_jar_rules JarRules N/A N/A N/A TargetDefinitionException self N/A N/A deploy_jar_rules must be a JarRules specification. got {} format N/A N/A type deploy_jar_rules __name__ N/A N/A manifest_entries N/A N/A isinstance manifest_entries dict N/A N/A N/A TargetDefinitionException self N/A N/A manifest_entries must be a dict. got {} format N/A N/A type manifest_entries __name__ N/A sources N/A source N/A source None N/A N/A sources kwargs N/A N/A N/A N/A self IllegalArgument N/A address spec jvm_binary only supports a single "source" argument, typically used to specify a main class source file. Other sources should instead be placed in a java_library, which should be referenced in the jvm_binary's dependencies. N/A payload N/A payload N/A Payload N/A N/A N/A payload add_fields N/A basename deploy_excludes deploy_jar_rules manifest_entries main shading_rules N/A PrimitiveField N/A basename name N/A ExcludesField N/A N/A self assert_list deploy_excludes expected_type Exclude key_arg deploy_excludes N/A FingerprintedField N/A deploy_jar_rules N/A N/A JarRules default N/A FingerprintedField N/A ManifestEntries manifest_entries N/A PrimitiveField main N/A PrimitiveField N/A shading_rules N/A N/A N/A N/A N/A super JvmBinary self __init__ name name address address payload payload sources N/A N/A self assert_list sources key_arg sources kwargs N/A basename N/A N/A self N/A N/A N/A N/A N/A self payload basename N/A property deploy_excludes N/A N/A self N/A N/A N/A N/A N/A self payload deploy_excludes N/A property deploy_jar_rules N/A N/A self N/A N/A N/A N/A N/A self payload deploy_jar_rules N/A property shading_rules N/A N/A self N/A N/A N/A N/A N/A self payload shading_rules N/A property main N/A N/A self N/A N/A N/A N/A N/A self payload main N/A property manifest_entries N/A N/A self N/A N/A N/A N/A N/A self payload manifest_entries N/A property N/A