summaryrefslogtreecommitdiff
path: root/databases/py-psycopg
diff options
context:
space:
mode:
authordrochner <drochner@pkgsrc.org>2002-10-25 14:17:24 +0000
committerdrochner <drochner@pkgsrc.org>2002-10-25 14:17:24 +0000
commitce35e7b8717ae72f7230a7df86639b886fb40c81 (patch)
tree43ef719d284c0b0307ba5999e9375f73df91b507 /databases/py-psycopg
parent68624369128325ea56c1ffb4353a6b8bd221053f (diff)
downloadpkgsrc-ce35e7b8717ae72f7230a7df86639b886fb40c81.tar.gz
another Python-PostgreSQL adapter
Diffstat (limited to 'databases/py-psycopg')
-rw-r--r--databases/py-psycopg/DESCR14
-rw-r--r--databases/py-psycopg/Makefile29
-rw-r--r--databases/py-psycopg/PLIST2
-rw-r--r--databases/py-psycopg/distinfo6
-rw-r--r--databases/py-psycopg/patches/patch-aa13
-rw-r--r--databases/py-psycopg/patches/patch-ab18
6 files changed, 82 insertions, 0 deletions
diff --git a/databases/py-psycopg/DESCR b/databases/py-psycopg/DESCR
new file mode 100644
index 00000000000..57c5659913e
--- /dev/null
+++ b/databases/py-psycopg/DESCR
@@ -0,0 +1,14 @@
+psycopg is a PostgreSQL database adapter for the Python programming language
+(just like pygresql and popy.) It was written from scratch with the aim of
+being very small and fast, and stable as a rock. The main advantages of
+psycopg are that it supports (well... *will* support) the full Python
+DBAPI-2.0 and being thread safe at level 2.
+
+psycopg is different from the other database adapter because it was designed
+for heavily multi-threaded applications that create and destroy lots of
+cursors and make a conspicuous number of concurrent INSERTs or UPDATEs.
+Every open Python connection keeps a pool of real (UNIX or TCP/IP) connections
+to the database. Every time a new cursor is created, a new connection does not
+need to be opened; instead one of the unused connections from the pool is
+used. That makes psycopg very fast in typical client-server applications that
+create a servicing thread every time a client request arrives.
diff --git a/databases/py-psycopg/Makefile b/databases/py-psycopg/Makefile
new file mode 100644
index 00000000000..17f88bca6c9
--- /dev/null
+++ b/databases/py-psycopg/Makefile
@@ -0,0 +1,29 @@
+# $NetBSD: Makefile,v 1.1.1.1 2002/10/25 14:17:24 drochner Exp $
+#
+
+DISTNAME= psycopg-1.0.13
+PKGNAME= ${PYPKGPREFIX}-psycopg-1.0.13
+CATEGORIES= databases
+MASTER_SITES= http://initd.org/pub/software/psycopg/
+
+MAINTAINER= packages@netbsd.org
+HOMEPAGE= http://initd.org/software/psycopg
+COMMENT= PostgreSQL database adapter for Python
+
+GNU_CONFIGURE= YES
+CONFIGURE_ARGS+= --with-python=${PYTHONBIN}
+CONFIGURE_ARGS+= \
+ --with-postgres-includes=${BUILDLINK_PREFIX.postgresql-lib}/include/pgsql \
+ --with-postgres-libraries=${BUILDLINK_PREFIX.postgresql-lib}/lib
+# XXX ${PYSITELIB}/... doesn't get transformed by buildlink2
+CONFIGURE_ARGS+= --with-mxdatetime-includes=${BUILDLINK_DIR}/include
+ALL_TARGET= default
+USE_BUILDLINK2= yes
+
+PYTHON_VERSIONS_ACCEPTED= 21pth 22pth
+PY_PATCHPLIST= yes
+
+.include "../../databases/postgresql-lib/buildlink2.mk"
+.include "../../lang/python/extension.mk"
+.include "../../time/py-mxDateTime/buildlink2.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/databases/py-psycopg/PLIST b/databases/py-psycopg/PLIST
new file mode 100644
index 00000000000..a93df4331ac
--- /dev/null
+++ b/databases/py-psycopg/PLIST
@@ -0,0 +1,2 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2002/10/25 14:17:24 drochner Exp $
+${PYSITELIB}/psycopgmodule.so
diff --git a/databases/py-psycopg/distinfo b/databases/py-psycopg/distinfo
new file mode 100644
index 00000000000..0e9b43bb748
--- /dev/null
+++ b/databases/py-psycopg/distinfo
@@ -0,0 +1,6 @@
+$NetBSD: distinfo,v 1.1.1.1 2002/10/25 14:17:24 drochner Exp $
+
+SHA1 (psycopg-1.0.13.tar.gz) = de0a3c15ddce77db865eaedbc49c5865c8f45b31
+Size (psycopg-1.0.13.tar.gz) = 177593 bytes
+SHA1 (patch-aa) = 1387802888548f23e93e3f14b4dabf0f51e967ae
+SHA1 (patch-ab) = 9c77a52068f0265d3a2d439d1facb705fb63f30e
diff --git a/databases/py-psycopg/patches/patch-aa b/databases/py-psycopg/patches/patch-aa
new file mode 100644
index 00000000000..e93628c06b4
--- /dev/null
+++ b/databases/py-psycopg/patches/patch-aa
@@ -0,0 +1,13 @@
+$NetBSD: patch-aa,v 1.1.1.1 2002/10/25 14:17:24 drochner Exp $
+
+--- Makefile.pre.in.orig Fri Oct 25 14:58:03 2002
++++ Makefile.pre.in Fri Oct 25 14:58:29 2002
+@@ -119,7 +119,7 @@
+ RANLIB= @RANLIB@
+ MACHDEP= @MACHDEP@
+ SO= @SO@
+-LDSHARED= @LDSHARED@
++LDSHARED= @LDSHARED@ @LDFLAGS@
+ CCSHARED= @CCSHARED@
+ LINKFORSHARED= @LINKFORSHARED@
+ @SET_CCC@
diff --git a/databases/py-psycopg/patches/patch-ab b/databases/py-psycopg/patches/patch-ab
new file mode 100644
index 00000000000..26f786ad920
--- /dev/null
+++ b/databases/py-psycopg/patches/patch-ab
@@ -0,0 +1,18 @@
+$NetBSD: patch-ab,v 1.1.1.1 2002/10/25 14:17:24 drochner Exp $
+
+--- module.h.orig Fri Oct 25 15:47:23 2002
++++ module.h Fri Oct 25 15:55:15 2002
+@@ -31,7 +31,12 @@
+ #include <libpq-fe.h>
+ #include <time.h>
+ #ifndef _WIN32
+-#include <pthread.h>
++#include <pth.h>
++#define pthread_mutex_t pth_mutex_t
++#define pthread_mutex_init(m, a) pth_mutex_init(m)
++#define pthread_mutex_lock(m) pth_mutex_acquire(m, FALSE, NULL)
++#define pthread_mutex_unlock(m) pth_mutex_release(m)
++#define pthread_mutex_destroy(m) /* nothing */
+ #else
+ #include <windows.h>
+ #define pthread_mutex_t HANDLE