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

python-protobuf

Options related to the Protobuf Python backend.

See https://www.pantsbuild.org/v2.3/docs/protobuf.

Config section: [python-protobuf]

Basic options

runtime_dependencies

--python-protobuf-runtime-dependencies="[<target_option>, <target_option>, ...]"
PANTS_PYTHON_PROTOBUF_RUNTIME_DEPENDENCIES
default: []

A list of addresses to `python_requirement_library` targets for the runtime dependencies needed for generated Python code to work. For example, `['3rdparty/python:protobuf', '3rdparty/python:grpcio']`. These dependencies will be automatically added to every `protobuf_library` target


mypy_plugin

--[no-]python-protobuf-mypy-plugin
PANTS_PYTHON_PROTOBUF_MYPY_PLUGIN
default: False

Use the `mypy-protobuf` plugin (https://github.com/dropbox/mypy-protobuf) to also generate .pyi type stubs.


Advanced options

mypy_plugin_version

--python-protobuf-mypy-plugin-version=<str>
PANTS_PYTHON_PROTOBUF_MYPY_PLUGIN_VERSION
default: mypy-protobuf==1.23

The pip-style requirement string for `mypy-protobuf`. You must still set `--mypy-plugin` for this option to be used.


Deprecated options

None

Updated 9 days ago


python-protobuf


Suggested Edits are limited on API Reference Pages

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