jeffdaily / parasail-python

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

MAINT: Add parasail headers to Python wheel. #62

Closed jvkersch closed 2 years ago

jvkersch commented 3 years ago

fixes #51

This adds the header files from the C library to the Python wheel, so that external Python packages and libraries can link against Parasail (using e.g. Cython). On both Linux and Windows, the headers are copied over from the downloaded C library, so that they match the version of the shared object file that is bundled with the egg.

I've also added two convenience functions that allow users to get the locations of includes and libraries without having to dig inside the installed location:

>>> import parasail
>>> parasail.get_include()
'/home/jvkersch/.edm/envs/parasail-clean/lib/python3.6/site-packages/parasail/include'
>>> parasail.get_library()
'/home/jvkersch/.edm/envs/parasail-clean/lib/python3.6/site-packages/parasail/libparasail.so'

I've verified that this works on Linux (by building the wheel and installing it in a new environment), and I'm reasonably confident that this works on Windows too, but I haven't tested on that platform.

jvkersch commented 3 years ago

@jeffdaily Sorry for the quick ping, but I was wondering if you could take a look at this. Happy to make any changes as needed!