Skip to main content
Version: 2.25 (dev)

system_binary


A system binary that can be run with pants run or consumed by adhoc_tool.

Pants will search for binaries with name binary_name in the search paths provided, as well as default search paths. If fingerprint is specified, each binary that is located will be executed with the arguments from fingerprint_args. Any binaries whose output does not match the pattern will be excluded.

The first non-excluded binary will be the one that is resolved.

Backend: pants.backend.experimental.adhoc


binary_name

str
required

The name of the binary to find.

description

str | None
default: None

A human-readable description of the target.

Use pants list --documented :: to see all targets with descriptions.

extra_search_paths

Iterable[str] | None
default: ()

Extra search paths to look for the binary. These take priority over Pants' default search paths.

fingerprint

str | None
default: None

A regular expression which will be used to match the fingerprint outputs from candidate binaries found during the search process.

fingerprint_args

Iterable[str] | None
default: ()

Specifies arguments that will be used to run the binary during the search process.

fingerprint_dependencies

Iterable[str] | None
default: None

Specifies any runnable dependencies that need to be available on the PATH when the binary is run, so that the search process may complete successfully. The name of the target must be the name of the runnable dependency that is called by this binary.

log_fingerprinting_errors

bool
default: True

If True, then any errors encountered while fingerprinting candidate binaries will be logged as a warning.

tags

Iterable[str] | None
default: None

Arbitrary strings to describe a target.

For example, you may tag some test targets with 'integration_test' so that you could run pants --tag='integration_test' test :: to only run on targets with that tag.