Options specific to generating Python from Thrift using Apache Thrift

Backend: pants.backend.codegen.thrift.apache.python
Config section: [python-thrift]

Basic options


--python-thrift-options="['<str>', '<str>', ...]"


default: []

Code generation options specific to the Python code generator to pass to the Apache thift binary via the -gen py argument. See thrift -help for supported values.

Advanced options




default: True

If True, will add a dependency on a python_requirement target exposing the thrift module (usually from the thrift requirement).

If [python].enable_resolves is set, Pants will only infer dependencies on python_requirement targets that use the same resolve as the particular thrift_source / thrift_source target uses, which is set via its python_resolve field.

Unless this option is disabled, Pants will error if no relevant target is found or more than one is found which causes ambiguity.

Deprecated options


Did this page help you?