Hey! These docs are for version 2.0, which is no longer officially supported. Click here for the latest version, 2.7!

python-protobuf

Options related to the Protobuf Python backend.

Config section: [python-protobuf]

Basic options

--python-protobuf-runtime-dependencies="[<target_option>, <target_option>, ...]"
PANTS_PYTHON_PROTOBUF_RUNTIME_DEPENDENCIES
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

--[no-]python-protobuf-mypy-plugin
PANTS_PYTHON_PROTOBUF_MYPY_PLUGIN
mypy_plugin
default: False
Use the `mypy-protobuf` plugin (https://github.com/dropbox/mypy-protobuf) to also generate .pyi type stubs.

Advanced options

--python-protobuf-mypy-plugin-version=<str>
PANTS_PYTHON_PROTOBUF_MYPY_PLUGIN_VERSION
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


Did this page help you?