diff options
author | Petteri Aimonen <jpa@git.mail.kapsi.fi> | 2014-02-12 19:43:04 +0200 |
---|---|---|
committer | Petteri Aimonen <jpa@git.mail.kapsi.fi> | 2014-02-12 19:43:04 +0200 |
commit | 542463dbaa3acae564e4a1eddf264e1fe226c38a (patch) | |
tree | cfca5d64513f55663fde253a104916dc316ae310 /generator/nanopb_generator.py | |
parent | fe0bf121eb606d9accbc0fc8be6b1ff6fd5f6f27 (diff) |
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
Diffstat (limited to 'generator/nanopb_generator.py')
-rwxr-xr-x | generator/nanopb_generator.py | 4 |
1 files changed, 2 insertions, 2 deletions
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) |