I have a situation where I want to make use of protocol buffers defined in a separate source tree; but when I compile the protobufs into python code all the compiled code assumes it's going to be exposed by putting it onto sys.path somehow (via one of the usual mechanisms). The problem is that due to the way the protobufs are defined in the original source tree this adds a bunch of new top-level packages and generally pollutes the global module namespace.
So I wanted to work around this by putting all the compiled protobufs into a package, but this doesn't work with protoc; it assumes that if a protobuf references X/Y/Z.proto, then there's going to be an X.Y.Z_pb2 module it can import. I can fix this by editing all the proto files to change all the references to be relative to this new package I'm defining but that basically means I have to fork the proto files from this other project. Is there any better mechanism when compiling protobufs that would allow me to put the compiled output into a package, rather than having to hang them off of sys.path or tweak all the proto files? -- John -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.
