
Hi, I would like to make a package that is able to use a system's given C-library if found, or compile its own version shipped with the package. This is bringing up two questions: - Is there a distutils/distribute facility to help test for the presence (and version) of a C library, or do I have to roll my own system ? - When having the source for a C library shipping with a package, is there a way to get distutils/distribute compile it, and get it seen by Python at runtime (so I can just use ctypes, or cffi, and even C extensions in other Python package see the headers and compiled libraries) ? Best, Laurent PS: I have noticed that pyzmq seems to be doing a lot of that, but they also appear to have a relatively big set of custom code do so (setup.py is already a little longer than most install scripts, to which a complete package 'buildutils' should be added)... this makes me anticipate that the answer to my two questions will be "no" ( :/ ) but I'd like a confirmation from the experts.