-*-outline-*- $Id$ * ================================ Zope 2.7.x install ** -------- Python 2.3.4 build, from source (SuSE attempt, Mon Jul 26 2004) *** ---- set paths, unpack and patch ## NOTE: I use 'sudo' to run commands as 'root' ## (instead of using a root login-shell) ## ## SEE http://www.courtesan.com/sudo/sudo.html ## http://www.onlamp.com/lpt/a/2680 "Eliminating root w/sudo" ## NOTE: these build pre-requisites! # BuildPrereq: bzip2-devel # BuildPrereq: db4-devel # BuildPrereq: expat-devel # BuildPrereq: gdbm-devel # BuildPrereq: openssl-devel export PYSRC=/usr/local/src/Python export PYDIR=$PYSRC/Python-2.3.4 ## where the source is export PFIX=/usr/local/python-2.3.4-1 ## where to install Py 2.3.3 export PYVERS=2.3.4 cd $PYSRC /bin/rm -f ${PYVERS}.log /bin/rm -rf $PYDIR tar -jxf $PYSRC/tarfiles/Python-2.3.4.tar.bz2 ( cd $PYDIR ## patch -p1 -b < your.favorite.patches ) >> ${PYVERS}.log 2>&1 *** ---- now, add missing Modules via "Setup.local" cp -p shmmodule.c $PYDIR/Modules ## from Redhat RPM; optional (cd $PYDIR/Modules cat >> Setup.local << EOF # bzip2 module bz2 bz2module.c -lbz2 # crypt module crypt cryptmodule.c -lcrypt # crypt(3); needs -lcrypt on some systems # curses, etc # wrapper for the panel library that's part of ncurses and SYSV curses. TCAPLIB=/usr/lib/termcap CURSLIB=/usr/lib/curses _curses _cursesmodule.c -L\$(CURSLIB) -L\$(TCAPLIB) -lcurses -ltermcap _curses_panel _curses_panel.c -lpanel -lncurses # Edit the variables DB and DBLIBVERto point to the db top directory # and the subdirectory of PORT where you built it. # DB=/usr/include/db4 DBLIBVER=4.1 DBINC=\$(DB) DBLIB=/usr/lib _bsddb _bsddb.c -I\$(DBINC) -L\$(DBLIB) -ldb-\$(DBLIBVER) # install GDBM module gdbm gdbmmodule.c -I/usr/include/gdbm -lgdbm # The mpz module interfaces to the GNU Multiple Precision library. # You need to ftp the GNU MP library. mpz mpzmodule.c -lgmp # GNU readline. readline readline.c -L\$(TCAPLIB) -lreadline -ltermcap # Socket module helper for SSL support _ssl _ssl.c -DUSE_SSL -I/usr/include/openssl -I/usr/kerberos/include -lssl -lcrypto # Andrew Kuchling's zlib module zlib zlibmodule.c -lz # Shared memory module - !OPTIONAL! shm shmmodule.c EOF ) >> ${PYVERS}.log 2>&1 ## run Configure ( cd $PYDIR env OPT='-O3 -march=i686' \ ./configure --enable-unicode=ucs4 \ --with-pymalloc \ --prefix=$PFIX ) >> ${PYVERS}.log 2>&1 & *** ---- run 'make test' -- builds everything ## NOTE: curses test will fail, if not run from console! ( cd $PYDIR make test TESTOPTS="-l -unetwork -ubsddb -ucurses" || /bin/true ) >> $PYSRC/${PYVERS}.log 2>&1 & sudo /bin/rm -rf $PFIX ## remove old version ( cd $PYDIR sudo make install ## go ahead, install Python! :^) ) >> $PYSRC/${PYVERS}.log 2>&1 & sudo rm /usr/local/Python-2.3 ## optional sudo ln -s $PFIX /usr/local/Python-2.3