# $Id: Portfile,v 1.3 2005/07/18 19:34:45 mww Exp $

PortSystem 1.0
PortGroup python24 1.0

name			py-pgsql
version			2.4
revision		2
categories		python databases
platforms		darwin
maintainers		mww@opendarwin.org
description		python DB-API 2.0 compliant interface to postgresql
long_description	pyPgSQL is a package of two modules that provide a \
				Python DB-API 2.0 compliant interface to PostgreSQL \
				databases. The first module, libpq, exports the \
				PostgreSQL C API to Python. This module is written in \
				C and can be compiled into Python or can be \
				dynamically loaded on demand. The second module, \
				PgSQL, provides the DB-API 2.0 compliant interface and \
				support for various PostgreSQL data types, such as \
				INT8, NUMERIC, MONEY, BOOL, ARRAYS, etc.

homepage		http://pypgsql.sourceforge.net/
master_sites	sourceforge:pypgsql
distname		pyPgSQL-${version}
checksums		md5 56d4003e5192de9a09de468a7641bd11
patchfiles		patch-setup.py.diff

depends_lib-append	port:postgresql8

worksrcdir		pypgsql

post-patch {
	reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/setup.py
}

post-destroot {
	xinstall -m 644 -W ${worksrcpath} Announce ChangeLog README \
		README.html TODO ${destroot}${prefix}/share/doc/${name}
	xinstall -m 644 -W ${worksrcpath}/examples basic.py demo1a.py \
		demo1b.py demo2a.py demo2b.py \
		${destroot}${prefix}/share/doc/${name}/examples
}
