From 31eb06f933f05ee0c72c24d976134e15b842b6b2 Mon Sep 17 00:00:00 2001 From: Yik San Chan Date: Tue, 23 Nov 2021 19:45:10 +0800 Subject: [PATCH] fix: edit generated python code st relative import works The issue dates back to https://github.com/protocolbuffers/protobuf/issues/1491 --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index 3d4174051..8ac748f6a 100644 --- a/Makefile +++ b/Makefile @@ -26,6 +26,8 @@ codegen: --python_out=oomd/codegen \ --grpc-python_out=oomd/codegen \ oomd/oomd.proto + sed -i '' "s|import status_pb2|from . import status_pb2|g" oomd/codegen/oomd_pb2.py + sed -i '' "s|import oomd_pb2|from . import oomd_pb2|g" oomd/codegen/oomd_pb2_grpc.py .PHONY: build build: featctl