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

Pex files

When working with Python code, Pants makes frequent use of the Pex (Python EXecutable) format. So, you'll see Pex referenced frequently in this documentation.

A Pex is a self-contained Python environment, similar in spirit to a virtualenv. A Pex can contain combinations of Python source files, 3rd-party requirements (sdists, eggs, or wheels), resource files, and metadata describing the contents.

Importantly, this metadata can include:

  • Python interpreter constraints.
  • An entry point.

A Pex can be bundled into a single .pex file. This file, when executed, knows how to unpack itself, find an interpreter that matches its constraints, and run itself on that interpreter. Therefore deploying code packaged in a Pex file is as simple as copying the file to an environment that has a suitable Python interpreter!

Updated 11 months ago

Pex files

Suggested Edits are limited on API Reference Pages

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