[Distutils] suggestions for mod_python

Gregory (Grisha) Trubetskoy grisha@modpython.org
Fri Jun 8 17:59:01 2001


Sorry, I'm a newbie to distutils and the sig, I need some advice.

I am trying to adopt mod_python to distutils. Here is my dilemma:

The end result of the mod_python compile is usually a file called
mod_python.so. Mod_python.so is NOT a Python module, it's an Apache
module. (There is also a Python package to go along with it, but that's
irrelevant here I think).

Currently, at ./configure time I peek in Modules/Makefile to find out the
libs against which Python was linked (which breaks in python 2.1, btw).
The actual mod_python.so is built using apxs. Apxs is a tool that comes
with Apache to build Apache modules. It knows what compile/linker args the
module will need as far as Apache is concerned, and it takes all necessary
libs for Python as an argument via a Makefile built by autoconf.

I'm thinking that the right way to go is use some fucntionality of
distutils that can just list me the necessay libs during ./configure and
stick with useing apxs, since the end result isn't a Python but an Apache
module... So far I haven't been able to figure out how to get that info
(but then I've only spent a day looking at distutils...)

Any advice/suggestions would be very much appreciated,

Grisha