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

Create initial BUILD files

Many Pants operations require extra metadata that describes units of code and the dependencies between them. These units are called targets and the metadata lives in BUILD files scattered throughout the codebase. You can read more about targets and BUILD files here.

Some of this metadata, such as dependencies, can often be inferred by Pants, which cuts down on boilerplate. And much of the remaining metadata can be generated for you, and checked in to the repo.

To get started with an initial set of BUILD files, run:

./pants tailor

This will generate an initial set of BUILD files containing targets to represent your library and test packages. You may need to further edit these BUILD files, but in many cases the generated ones will get you off to a good start as-is.

You can re-run ./pants tailor in the future, as you add new packages.

Updated 3 months ago

Create initial BUILD files

Suggested Edits are limited on API Reference Pages

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