Skip to content

fabiorizzo.com - PZP Rocks!!!

Sections
Personal tools
You are here: Home Members pythondeveloper Zope com PostgreSQL e Psycopg
Document Actions

Zope com PostgreSQL e Psycopg

Nesse pequeno artigo pretendo mostrar como é fácil colocar o Elefante para trabalhar com Zope.

Plataforma Usada e Pacotes usados

  • FreeBSD-6
  • Python2.3
  • Zope2.8
  • PostgreSQL 7.4.1
  • Egenix 2.0.6
  • Psycopg 1.1.6

Downloads Pacotes necessários


  • Python 2.3 - http://www.python.org/ftp/python/2.3.5/Python-2.3.5.tgz
  • Zope2.8 - http://www.zope.org/Products/Zope/2.8.0/Zope-2.8.0-final.tar.gz
  • PostgreSQL - http://www.postgresql.org
  • Egenix - http://www.egenix.com/files/python/egenix-mx-base-2.0.6.tar.gz
  • Psycopg - http://www.zope.org/Members/fog/psycopg/1.1.6/psycopg-1.1.6.tar.gz

Compilando os Pacotes


Instalando o PostgreSql

./configure --with-includes=DIRS --with-libraries=DIRS
make
make install

Instalando Egenix

python setup.py install

Instalando Psycopg

./configure --with-python=/usr/bin/python \
--with-python-version=2.3 \
--with-postgres-includes=/usr/local/pgsql/include/ \
--with-postgres-libraries=/usr/local/pgsql/lib/ \
--with-mxdatetime-includes=/usr/local/lib/python2.3/site-packages/mx/DateTime/mxDateTime/ \
--enable-devel=yes

Após realizar esses passos, entre no diretório do Psycopg e copie o diretório ZPsycopgDA para o diretório Products da sua instância Zope dê um restart no seu zope e em "Select type to add", procure por "Z Psycopg Database Connection", pronto agora vc tem o driver adapter de conexão com o Elefante.

Espero ajudar a todos que usam PostgreSQL(O Elefante) a solucionar esse "chatissimo" problema de instalar o driver adapter conhecido por Psycopg.

[]'s
Fernando Paiva
by Fernando Paiva last modified 08/08/2006 04:12

 

Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: