Commit 27bf3185 authored by Carlos Natalino's avatar Carlos Natalino
Browse files

Including grpclib to the common requirements and generating async Python code from protobuf

parent 64714603
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@ coverage==6.3
grpcio==1.47.*
grpcio-health-checking==1.47.*
grpcio-tools==1.47.*
grpclib[protobuf]
prettytable==3.5.0
prometheus-client==0.13.0
protobuf==3.20.*
+3 −0
Original line number Diff line number Diff line
@@ -38,5 +38,8 @@ EOF
# Generate Python code
python3 -m grpc_tools.protoc -I=./ --python_out=src/python/ --grpc_python_out=src/python/ *.proto

# new line added to generate protobuf for the `grpclib` library
python3 -m grpc_tools.protoc -I=./ --python_out=src/python/asyncio --grpclib_python_out=src/python/asyncio *.proto

# Arrange generated code imports to enable imports from arbitrary subpackages
find src/python -type f -iname *.py -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \;