cool-easter-32542
01/09/2024, 5:02 PMgrpcio. However, there are other available python package such as grpclib or betterproto that provides protoc plugins.
Describe the solution you'd like
It could be nice to be able to define the python plugin used to generate the python stubs.
Maybe something like:
protobuf_sources(
name="protos",
grpc=True,
python_protoc_plugin="grpclib"
)
or maybe even make it a list so many protoc plugins can be registered:
protobuf_sources(
name="protos",
grpc=True,
python_protoc_plugins=["grpclib", "mypy-protobuf"]
)
I'm not very knowledgeable of pants internal, so I'm not sure if there would be a clean way to make this part extendable by new rules (using the enum system?).
Additional context
I have a basic working POC here: https://github.com/pantsbuild/pants/compare/main...isra17:pants:protobuf-grpclib?expand=1
Is that something you would want to see contribution for? If so, what about my current approach? If I add the tests, would you take this?
pantsbuild/pantscool-easter-32542
01/15/2024, 5:24 AM