Skip to content
Permalink
Browse files

Bug: https://trac.macports.org/ticket/890

Submitted by:   mww@opendarwin.org

new port, py-psycopg

git-svn-id: https://svn.macports.org/repository/macports/trunk/dports@3850 d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
Markus W. Weißmann
Markus W. Weißmann committed Oct 29, 2003
1 parent 86f25d2 commit a992fb5d78c95f387ea7b4e5dbb63044a1c3fb76
Showing with 51 additions and 0 deletions.
  1. +51 −0 python/py-psycopg/Portfile
@@ -0,0 +1,51 @@
# $Id: Portfile,v 1.1 2003/10/29 17:57:48 mww Exp $

PortSystem 1.0

name py-psycopg
version 1.1.9
categories python databases
maintainers mww@opendarwin.org
description a postgresql database adapter for python
long_description psycopg is a postgresql database adapter for python. \
It's fully complaint to pythons DBAPI-2.0. pycopg is designed \
for heavily multi-threaded applications featuring connection \
pooling.

homepage http://www.initd.org/software/initd/psycopg/
master_sites http://initd.org/pub/software/psycopg/
distname psycopg-${version}
checksums md5 3a8ab26a7b9d83c179675866e7d6d414

#depends on postgresql +devel variant!
depends_lib lib:libpq:postgresql \
lib:mxDateTime.h:py-mx \
bin:python:python

configure.env LDFLAGS="-L${prefix}/lib" \
CPPFLAGS="-I${prefix}/include \
-I${prefix}/lib/python2.3/site-packages/mx/DateTime/mxDateTime/ \
-I${prefix}/lib/python2.2/site-packages/mx/DateTime/mxDateTime/ \
-I${prefix}/lib/python2.1/site-packages/mx/DateTime/mxDateTime/"
configure.args --with-postgres-includes=${prefix}/include/postgresql/server

post-configure {
reinplace "s|PY_LIB_DIR = \$(prefix)|\
PY_LIB_DIR = ${destroot}${prefix}|g" ${worksrcpath}/Makefile
reinplace "s|PY_MOD_DIR = \$(exec_prefix)|\
PY_MOD_DIR = ${destroot}${prefix}|g" ${worksrcpath}/Makefile
reinplace "s|@echo 'Installing shared modules...'|\
install -m 755 -d \$(PY_MOD_DIR)|g" ${worksrcpath}/Makefile
}

build.env CPPFLAGS="-I${prefix}/include -Wno-long-double"
build.target

post-destroot {
system "cd ${worksrcpath} \
&& install -d -m 755 ${destroot}${prefix}/share/doc/${name}/examples \
&& cp AUTHORS COPYING RELEASE-1.0 CREDITS SUCCESS ChangeLog FAQ TODO \
VERSION INSTALL NEWS README doc/python-taylor.txt \
${destroot}${prefix}/share/doc/${name} \
&& cp doc/examples/*.py ${destroot}${prefix}/share/doc/${name}/examples"
}

0 comments on commit a992fb5

Please sign in to comment.
You can’t perform that action at this time.