Pants v2: The ergonomic build system

Welcome to the Pants v2 documentation hub!

Pants v2 is a fast, scalable, user-friendly build system for growing codebases. It's currently focused on Python, with support for other languages coming soon.

Here you'll find guides to help you get started with Pants v2, comprehensive documentation on how to configure, run and customize Pants v2, and information on how to get help from the Pants community.

Get Started
./pants filedeps [args]

List all source and BUILD files a target depends on.

Config section: [filedeps]

Basic options

output_file

--filedeps-output-file=<path>
PANTS_FILEDEPS_OUTPUT_FILE
default: None

Output the goal's stdout to this file. If unspecified, outputs to stdout.


sep

--filedeps-sep=<separator>
PANTS_FILEDEPS_SEP
default: \\n

String to use to separate lines in line-oriented output.


absolute

--[no-]filedeps-absolute
PANTS_FILEDEPS_ABSOLUTE
default: False

If True, output with absolute path. If unspecified, output with path relative to the build root.


globs

--[no-]filedeps-globs
PANTS_FILEDEPS_GLOBS
default: False

Instead of outputting filenames, output the original globs used in the BUILD file. This will not include exclude globs (i.e. globs that start with `!`).


transitive

--[no-]filedeps-transitive
PANTS_FILEDEPS_TRANSITIVE
default: False

If True, list files from all dependencies, including transitive dependencies. If unspecified, only list files from the target.


Advanced options

None

Deprecated options

None

Related subsystems

download-pex-bin, filedeps, grpc_python_plugin, pex, protoc, python-infer, python-native-code, python-protobuf, python-protobuf.mypy-plugin, python-repos, python-setup, source, subprocess-environment

Updated about a month ago


filedeps


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.