-
Notifications
You must be signed in to change notification settings - Fork 645
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
issue with cython headers for external projects #178
Comments
I'll remove the message cimport from socket.pxd, thanks. I believe that was lingering from an old API when Message was referenced in one of the Socket cdef methods. I have no experience building libraries that should be cimportable, so any help/guidance is useful, though I know gevent-zeromq has had success. Does removing that one cimport solve your issue? libzmq.pxd is simply a cython expression of zmq.h, so I don't see how it would be useful if you don't have zmq.h. Can you describe the exact issue there? For instance, how would you express zmq_msg_t in message.pxd without depending on zmq.h, or am I misunderstanding the issue? |
For sockets, removing cimport message resolves the issue perfectly. For message.pxd and anything else depending on libzmq, the problem is that Thanks for the fixes! This should make creating the implementation of fast On Sat, Feb 18, 2012 at 1:46 PM, Min RK <
|
allocate.h and zmq_compat.h ship with pyzmq in zmq/utils, so you should always have them if you have pyzmq. I did just check, and the path reported by |
The current version of pyzmq gives the .pxd files needed for cython to expose zmq objects, but all of the high level objects in zmq/core directly or indirectly link to libzmq.pxd. The problem with this is that libzmq references some headers that no python/cython program should need and aren't included with many packages.
Making C extension libraries that can use pyzmq sockets for instance can't currently cimport zmq.core.socket because socket cimports message (unnecessarily) and message cimports libzmq.
It would be helpful to remove unecessary references to libzmq where possible, or to split libzmq ether apart, to prevent references to implementation headers, or to give purpose-built user-facing .pxd files that can be cimported without these problems.
The text was updated successfully, but these errors were encountered: