[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: building/installing Python modules?
From: |
roth . gnu |
Subject: |
Re: building/installing Python modules? |
Date: |
30 Apr 2002 12:58:54 -0700 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Cuyahoga Valley) |
==> "cw" == christoph wiedemann <address@hidden> 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