tonysimpson / nanomsg-python

nanomsg wrapper for python with multiple backends (CPython and ctypes) should support 2/3 and Pypy
MIT License
382 stars 85 forks source link

Enhancing nanomsg module files structure to be containable. #36

Closed alhabshi3k closed 9 years ago

alhabshi3k commented 9 years ago

Hi Tony,

Thank you for this module. Though i haven't use it that much , however , building and installing nanomsg and nanomsg-python was a struggling for me since i am a windows user. My interest in nanomsg is that it support IOCP for asynchronous networks messaging.

I have compiled nanomsg (DLL and cpython extension ) and pack it as Wheel file.

In this regards , i mode some modification as follows: 1- Compiled the nanomsg C code using GCC 4.9.2 and rename the file to nanomsg.dll. 2- moved each of nanomsg.dll , _nanomsg_cpy.pyd and _nanomsg_ctypes to nanomsg_wrappers folder. 3- modified the code of nanomsg_wrappers/initpy to import each _nanomsg_cpy.pyd and _nanomsg_ctypes from its current local folder rather from site-package main folder. later , it would be possible to have a nanomsg_cffi within the same folder.

So the package of nanomsg is contained in three folder rather four and _nanomsg_cpy.pyd file. This make it simpler to follow rather than searching distributed files within system path, Since not all windows users who program in python knows the C/C++ modules compilation requirements; they just like to install and use.

Attached within this post the wheel file , just remove the PNG extension and use "pip install nanomsg-1.0-cp27-none-win32.whl" .

I have tested the packages , other testers are welcome. Kindly , upload it to PyPi to allow other Python programmers to use with it less compiling complications.

take care.

nanomsg-1 0-cp27-none-win32 whl