Python and Autoconf

Martin von Loewis loewis at informatik.hu-berlin.de
Sun May 27 13:45:39 CEST 2001


A Meowbot <meowbot at meowing.net> writes:

> Wanna see something _really_ scary?
[...]

>     py_liblocalmod=`grep '^LOCALMODLIBS=' $py_libdir/config/Makefile | sed -e 's/^.*=//'`
>     py_libbasemod=`grep '^BASEMODLIBS=' $py_libdir/config/Makefile | sed -e 's/^.*=//'`
>     py_linkforshared=`grep '^LINKFORSHARED=' $py_libdir/config/Makefile | sed -e 's/^.*=//'`

I think you are linking way to much stuff in here. In an embedded
Python, you typically don't need all modules supported in the Python
installation, e.g. you'd rarely need _tkinter, or crypt, etc.

So I suggest that you put a custom setup.c into your project, which
only references the modules that you want to have as builtins. For
those modules, you can easily find out what additional libraries they
need, and find the locations of those libraries using standard
autoconf mechanisms.

Regards,
Martin




More information about the Python-list mailing list