I'm writing some bindings for a C library and am not sure how to configure all this for distribution so it is possible to pip install my package.
Let's say I have the following files:
library.clibrary.hwrapper.py
In order for my wrapper library to work it is necessary to:
- compile library.c and create a shared library
- run
ctypesgenonlibrary.hto generate the ctypes code
Here are the commands:
gcc -Wall -fPIC -c library.cgcc -shared -Wl,-soname,liblibrary.so.1 -o liblibrary.so.1.0 library.octypesgen.py library.h -L ./ -l library -o _library.py
Running setup.py will also depend on the user having installed ctypesgen.
I have no idea how to get this all set up so that someone interested in the library can simply pip install library and have all this happen automagically. Anyone able to help?