Is it possible to use xxx-config unix scripts from distutils?

Grzegorz Adam Hankiewicz gradha at titanium.sabren.com
Thu May 8 06:29:54 EDT 2003


Hi.

I have followed successfully the Python tutorial on building
a C spam module. Now I'm building this spam2.0 C module which
links against other Unix libraries. To know against which ones,
gcc uses backticks with the usual "libname-config --libs" script.
I can run this script and embed the output into my setup.py, but
I would prefer to use the usual script everywhere, since the libs
can change from place to place.

One solution would be to run this script myself from setup.py,
catch it's stdout and store it in a variable I could later pass to
Distutil's Extension constructor. I guess this must be quite common
with unix python modules, but I didn't find anything like this in
the documentation. Does distutils provide an automatic embedded
mechanism to run such scripts and extract their output?

-- 
 Please don't send me private copies of your public answers. Thanks.





More information about the Python-list mailing list