I wrote Python bindings using ctypes for the unit library. The bindings themselves are only ~ 100 lines of Python. The library does not need (for Python binding purposes) a dependency on tcl, and the configure script fails if tcl is missing. However, the library builds fine with gcc -Wl,-soname,units.so -o units.so -fPIC -shared units.c .
Now I would like to remove these bindings. There are three ways to do this.
- Release the bindings yourself, with the basic setup.py and providing instructions for building, downloading and installing the C library in the documentation.
- Release the bindings along with the source library source and provide the setup.py file, which handles compiling and installing the C library. This is obviously more for me.
- Just release the .py file and let users worry about installation and dependencies.
If I choose option 2, where should I put the library? Should I put it in the same directory as the .py file, which suggests lib_name = CDLL('./units.extension') , or should I put it in a directory that is usually located in the linker path ( e.g. / lib)? Also, how is this usually handled for Windows machines, which a) may not have a C compiler and b) do not have a standard place to host shared libraries?
Which of these options is preferred and what to do with Windows?
python release
Chinmay kanchi
source share