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
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
all: nanopb_pb2.py plugin_pb2.py descriptor_pb2.py
|
||||
all: nanopb_pb2.py plugin_pb2.py
|
||||
|
||||
%_pb2.py: %.proto
|
||||
protoc --python_out=. $<
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
// These are used by nanopb to generate statically allocable structures
|
||||
// for memory-limited environments.
|
||||
|
||||
import "descriptor.proto";
|
||||
import "google/protobuf/descriptor.proto";
|
||||
|
||||
option java_package = "fi.kapsi.koti.jpa.nanopb";
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
package google.protobuf.compiler;
|
||||
|
||||
import "descriptor.proto";
|
||||
import "google/protobuf/descriptor.proto";
|
||||
|
||||
// An encoded CodeGeneratorRequest is written to the plugin's stdin.
|
||||
message CodeGeneratorRequest {
|
||||
|
||||
Reference in New Issue
Block a user