-*-outline-*- $Id: pgsql_driver.txt,v 1.1 2004/05/21 16:13:48 biggers Exp $ * ================ PsycoPG PostgreSQL DB-api module installation ## Install for Python 2.3.x, and Zope 2.7+ ... on RHEL and SuSE linux ## on Debian Linux - Sarge/testing or Sid/unstable (do this) ## for just the Python driver (Zope is below) # # apt-get -u install zope-psycopgda python2.3-egenix-mxtools ** -------- Zope, Python env vars ZSRC=/alpha/local/src/Zope ## all tarfiles, Products ZHOME=/usr/local/Zope PYDIR=/usr/local/Python-2.3.3 ** -------- mxDateTime, etc. "mxTools" (a pre-req) http://www.egenix.com/files/python/ ## home page for "mxTools" ## Attempted to build from RPM -- no-go (SuSE 9) ## ## Easiest build-recipe ... ## first, APPLY this patch! (see below ...) http://www.egenix.com/mailman-archives/egenix-users/2004-February/000357.html patch -p0 -b < egenix-diff.patch ## TEST! TEST! cd $ZSRC/Products/egenix-mx-base-2.0.5 ## from tar-ball env 'CFLAGS=-O3 -march=i686 -mcpu=i686' \ $PYDIR/bin/python setup.py build >> ../emx.log 2>&1 & env 'CFLAGS=-O3 -march=i686 -mcpu=i686' \ $PYDIR/bin/python setup.py install >> ../emx.log 2>&1 & ## as ROOT ** -------- PsycoPG build 1.1.11 (for Zope 2.7.x & Python 2.3.3) ## Build from a src-RPM? (Search) http://rpm.pbone.net ## ## http://initd.org/software/initd/psycopg PYDIR=/usr/local/python-2.3.3-2 PSY_VERS=psycopg-1.1.11 LOG=${ZSRC}/Products/$PSY_VERS.log rm -f $LOG cd ${ZSRC}/Products/${PSY_VERS}/ ./configure \ --with-mxdatetime-includes=$PYDIR/lib/python2.3/site-packages/mx \ --with-python=$PYDIR/bin/python \ --with-python-version=2.3 \ --with-postgres-includes=/usr/include/pgsql \ --with-postgres-includes=/usr/include/pgsql/server \ --with-postgres-libs=$(/usr/bin/pg_config --libdir) \ >> $LOG 2>&1 & make clean && make >> $LOG 2>&1 make install >> $LOG 2>&1 ## as ROOT ## Install the Zope DB Adapter - ZPsycopgDA - Product sudo -u zope cp -pr ZPsycopgDA ${ZHOME}/lib/python/Products ${PYDIR}/bin/python ## testing ... >>> import psycopg ## this MUST work! ** -------- egenix mx-base patch I undefed MXDATETIME_FREELIST and rebuilt and everything seems fine. --- egenix-mx-base-2.0.5/mx/DateTime/mxDateTime/mxDateTime.c 2001-12-10 02:15:49.000000000 -0800 +++ egenix-mx-base-2.0.5-mod/mx/DateTime/mxDateTime/mxDateTime.c 2004-02-05 22:54:07.000000000 -0800 @@ -76,7 +76,7 @@ #define STRFTIME_OUTPUT_SIZE 1024 /* Define these to have the module use free lists (saves malloc calls) */ -#define MXDATETIME_FREELIST +#undef MXDATETIME_FREELIST #define MXDATETIMEDELTA_FREELIST /* Define this to enable the copy-protocol (__copy__, __deepcopy__) */