From 542463dbaa3acae564e4a1eddf264e1fe226c38a Mon Sep 17 00:00:00 2001 From: Petteri Aimonen Date: Wed, 12 Feb 2014 19:43:04 +0200 Subject: Move descriptor.proto to google/protobuf directory where it belongs. This fixes some interoperability problems when trying to compile nanopb.proto for e.g. the Google's C++ library. Update issue 104 Status: FixedInGit --- generator/nanopb_generator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'generator/nanopb_generator.py') diff --git a/generator/nanopb_generator.py b/generator/nanopb_generator.py index 2f2e8531..7c60ebe9 100755 --- a/generator/nanopb_generator.py +++ b/generator/nanopb_generator.py @@ -15,6 +15,7 @@ except: try: import google.protobuf.text_format as text_format + import google.protobuf.descriptor_pb2 as descriptor except: sys.stderr.write(''' ************************************************************* @@ -26,7 +27,7 @@ except: try: import proto.nanopb_pb2 as nanopb_pb2 - import proto.descriptor_pb2 as descriptor + import proto.plugin_pb2 as plugin_pb2 except: sys.stderr.write(''' ******************************************************************** @@ -1070,7 +1071,6 @@ def main_plugin(): msvcrt.setmode(sys.stdin.fileno(), os.O_BINARY) msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY) - import proto.plugin_pb2 as plugin_pb2 data = sys.stdin.read() request = plugin_pb2.CodeGeneratorRequest.FromString(data) -- cgit 1.2.3-korg