Thanks for your answer.

To give you a little bit more information, here's what I'm trying to
do. I want to deliver a tool using a custom protoc plugin implemented
in python, so that end user can generate code from its own proto
files.

There would be nothing special to do before using this plugin, but
since it depends on plugin_pb2, I need to find the plugin.proto file
(using pkg-config), compile it, and put it in some appropriate
location.

Also, I can't put it in its "natural" parent python package
(google.protobuf) which is already provided by protobuf installation.
On the other side, the c++ code is generated (and I guess, compiled
into the shared library), which makes it a little bit more
straightforward to write c++ plugins.

What would be the best way to achieve what I'm trying to do? If the
python library size increase is not acceptable there, couldn't the
plugin_pb2 file be generated in an independent location, so that one
could still rely on it being present on any protobuf install?

Thanks for your advices,

Louis-Marie


2010/10/6 Kenton Varda <ken...@google.com>:
> It's not generated because none of the python implementation actually uses
> it.  So, generating it and including it in the egg would just increase the
> library size for everyone, when most people don't need it.
> What makes you feel uncomfortable about generating it yourself?
>
> On Fri, Oct 1, 2010 at 6:01 AM, Louis-Marie <lm.mou...@gmail.com> wrote:
>>
>> Hi all,
>>
>> It looks like python installation of protocol buffers does not
>> generate the google.protobuf.compiler.plugin_pb2 python file, while
>> google.protobuf.descriptor_pb2 is explicitly generated by
>> protobuf/python/setup.py
>>
>>  generate_proto("../src/google/protobuf/descriptor.proto")
>>
>> Shouldn't the plugin.proto file be compiled and installed the same
>> way? Maybe I am missing something there, be I feel very uncomfortable
>> recompiling it when I need to write a plugin.
>>
>> Thanks,
>>
>> Louis-Marie
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Protocol Buffers" group.
>> To post to this group, send email to proto...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> protobuf+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/protobuf?hl=en.
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Protocol Buffers" group.
> To post to this group, send email to proto...@googlegroups.com.
> To unsubscribe from this group, send email to
> protobuf+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/protobuf?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to proto...@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.

Reply via email to