On Mon, 08 Jul 2013 13:01:25 +0200, Laurent Gautier wrote: > 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 ?
No. Here is a rather clean script that encapsulates pkg-config: http://git.enlightenment.org/bindings/python/python-efl.git/tree/setup.py > - 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) ? I don't think you should do any kind of bundling. That will easily decuple the complexity of your setup scripts, for a subpar result. Point to the C project and let people install it as they will. _______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig