This is the mail archive of the
automake@gnu.org
mailing list for the automake project.
Re: building/installing Python modules?
- From: roth dot gnu at ursus dot net
- To: automake at gnu dot org
- Date: 30 Apr 2002 12:58:54 -0700
- Subject: Re: building/installing Python modules?
- Newsgroups: mlist.gnu.automake
- Organization: See Organization field for details
- References: <0057440013138414000002L442*@MHS>
==> "cw" == christoph wiedemann <christoph.wiedemann@daimlerchrysler.com> writes:
cw> I thought of using the auto* tools for building python
cw> extensions a few months ago now, but since i was using swig, i
cw> did not know how to integrate the swig meta files (*_wrap.c)
cw> into the auto* stuff - the way to write a script which edits
cw> the Makefile.in does not look practical to me. Now i have a
cw> patchwork, using GNU make (to generate the meta files)
cw> together with distutils (build / install the extensions). Very
cw> unsatisfying.
As much as I like the idea of the distutils for building python
extensions, too much of my code is in C++ and the benefits of using
automake are enormous. What I ended up doing is building the
swig/python modules with automake. Gleaning LIBPY and other python
variables is easy from aclocal.m4.
The idea of editing the Makefile.in isn't too bad; automake's support
for plugins is currently lacking, but projects like kde work around it
on a regular basis. I believe they do it for the .moc support, among
other things.
The missing link I had to fix with automake/python module support was
that python wouldn't load uninstalled automake shared objects as
python extensions. The solution was to write a python importer for
libtool .la files. Libtool does this in order to link against .la
files, why can't python do the same at run-time?
C