Python Un*x build with a Python shared library
Oleg Broytmann
phd at phd.fep.ru
Tue May 15 09:16:33 EDT 2001
On Tue, 15 May 2001, Frederic Giacometti wrote:
> Changes requested on the current Python 2.1 source distribution:
> ==========================================
> Changes should be required in only two location:
> - main Python Makefile
> - the distutil code that links the dynamic extensions.
Nice to see someone returned to the issue. The following shell script
works for me perfectly (Linux, of course):
-----
#! /bin/sh
# For Linux systems, the simplest method of producing libpython.so seems to be
# (originally from the Minotaur project web page, http://mini.net/pub/ts2/minotaur.html)
make distclean
OPT="-fpic -O2" CPPFLAGS=-I/usr/local/include/ncurses mconfig $*
make || exit 1
mkdir .extract
(cd .extract; ar xv ../libpython2.1.a)
gcc -shared -o libpython2.1.so .extract/*.o
rm -rf .extract
-----
But of course it'd be nice to allow Distutils recognize a platform and
do appropriate build.
Oleg.
----
Oleg Broytmann http://phd.pp.ru/ phd at phd.pp.ru
Programmers don't die, they just GOSUB without RETURN.
More information about the Python-list
mailing list