facebook / buck2

Build system, successor to Buck

Home Page:https://buck2.build/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add an example of how to use grpc in Python

maryamb opened this issue · comments

Are there already rules for building grpc artifacts in Python?
I could see some for rust but none for Python.
If the related rules already exist, can you add some examples of how to use them (for Python).
If not, can you sketch how we can make such rules?

def rust_protobuf_library(
is probably a reasonable start. Note that we defined a macro that just internally uses genrule to run the protobuf compiler. I'd figure out what command lines you need to convert proto files into Python files, code it up as a genrule, and then depend on the outputs as the Python.

We should probably have first-class proto rules in Buck2 one day, but no one has got around to that yet.