Comment #40 on issue 66 by james.pe...@gmail.com: cannot install using easy_install
http://code.google.com/p/protobuf/issues/detail?id=66

I'm not sure if this is a perfect solution but it seems to work.
It appears as though the first pass through setup.py finds the file (descriptor.proto) in the specified location. However, when the build task is launched it's running in "protobuf-2.4.1/python/build/bdist.linux-x86_64/rpm/BUILD/protobuf-2.4.1". In this case, "../src/google/protobuf/descriptor.proto" does not exist.
Here's how I handled it.

    if os.path.exists('../src/google/protobuf/descriptor.proto'):
        generate_proto("../src/google/protobuf/descriptor.proto")
        generate_proto("../src/google/protobuf/compiler/plugin.proto")
    else:
generate_proto("../../../../../../src/google/protobuf/descriptor.proto") generate_proto("../../../../../../src/google/protobuf/compiler/plugin.proto")

--
You received this message because you are subscribed to the Google Groups "Protocol 
Buffers" group.
To post to this group, send email to protobuf@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