Skip to main content
Version: 2.9 (deprecated)

python-protobuf


Options related to the Protobuf Python backend.

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

Backend: ``

Config section: [python-protobuf]

Basic options

mypy_plugin

--[no-]python-protobuf-mypy-plugin
PANTS_PYTHON_PROTOBUF_MYPY_PLUGIN
pants.toml
[python-protobuf]
mypy_plugin = <bool>
default: False

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

runtime_dependencies

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

A list of addresses to python_requirement 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_sources target

Advanced options

None

Deprecated options

None

None