My project pulls the protobuf source directly from
code.google.com, and builds the tools and libs (protoc, libprotobuf, libprotobuf-lite) as part of its build process. But now I want to use protos from Python, and I'm having trouble getting the python protobuf library to import properly from the generated _pb2.py code.
Protobuf's
python/ directory is in my PYTHONPATH, but my standalone python build chokes on the python/google/__init__.py:
__import__('pkg_resources').declare_namespace(__name__)
|
because the hermetic python used by my build doesn't have setuptools. Simply removing that line (or adding a try/except for ImportError) seems to make things to work for me.
Do I really need to pull in setuptools, in order to use python protobufs? Or is there a way to make the pkgresources dependency optional?
- nick
--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To post to this group, send email to
prot...@googlegroups.com.
To unsubscribe from this group, send email to
protobuf+u...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/protobuf?hl=en.