jeffdaily / parasail-python

Python bindings for the parasail C library.
Other
87 stars 17 forks source link

create python wheel for pip install #2

Closed jeffdaily closed 8 years ago

jeffdaily commented 8 years ago

No time like the present to teach myself how to use pip and create my own distros for parasail.

jeffdaily commented 8 years ago

Done. See https://pypi.python.org/pypi/parasail/. Followed instructions on https://hynek.me/articles/sharing-your-labor-of-love-pypi-quick-and-dirty/. Currently, it's a manual process to create binary wheels for windows and OSX.

Windows

Use CMake to create MSVC 2012 solutions. Must turn on BUILD_SHARED_LIBS. After building, copy the 32-bit DLL into parasail-python/parasail (next to __init__.py). Then run C:\Python27\python.exe setup.py bdist_wheel. Then copy the 64-bit DLL over the top of the other DLL and run bdist_wheel again, this time using C:\Python27x64\python.exe. Also run the sdist target since it will make a ZIP file, too. Use twine to upload (see above link for quick and dirty approach).

OSX

Use configure --enable-shared CFLAGS="-arch x86_64 -arch i386" to build a multi-arch "fat" shared library libparasail.dylib. As with windows, copy the dylib into parasail-python/parasail and then run the setup.py bdist_wheel target. Also run the sdist target since it will make a tar.gz file, too. Use twine to upload to pypi.