Pants v2: Fast, consistent builds for Python and more

Welcome to the Pants v2 documentation hub!

Pants v2 is a fast, scalable 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 py-constraints [args]

Determine what Python interpreter constraints are used by files/targets.

Config section: [py-constraints]

Basic options


default: None

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


default: False

Output a CSV summary of interpreter constraints for your whole repository. The headers are `Target`, `Constraints`, `Transitive Constraints`, `# Dependencies`, and `# Dependees`.

This information can be useful when prioritizing a migration from one Python version to another (e.g. to Python 3). Use # Dependencies and # Dependees to help prioritize which targets are easiest to port (low # dependencies) and highest impact to port (high # dependees).

Use a tool like Pandas or Excel to process the CSV. Use the option --py-constraints-output-file=summary.csv to write directly to a file.

Advanced options


Deprecated options


Related subsystems

download-pex-bin, grpc_python_plugin, pex, protoc, py-constraints, python-infer, python-native-code, python-protobuf, python-repos, python-setup, source, subprocess-environment

Updated 9 days ago


Suggested Edits are limited on API Reference Pages

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