Building a ctypes-“based” C library with distutils
问题 Following this recommendation, I have written a native C extension library to optimise part of a Python module via ctypes. I chose ctypes over writing a CPython-native library because it was quicker and easier (just a few functions with all tight loops inside). I've now hit a snag. If I want my work to be easily installable using distutils using python setup.py install , then distutils needs to be able to build my shared library and install it (presumably into /usr/lib/ myproject ). However,