summaryrefslogtreecommitdiff
path: root/databases/py-PgSQL
diff options
context:
space:
mode:
authorrecht <recht>2003-09-09 13:46:24 +0000
committerrecht <recht>2003-09-09 13:46:24 +0000
commitd6601cf6ec9e127b96caeba4a7b4cc0f601eb595 (patch)
treec623582f3c441a0549c9e9d7c143e7a2eed6dcae /databases/py-PgSQL
parent6a1d11b2792366c2fa2b02e9745a72f97d946155 (diff)
downloadpkgsrc-d6601cf6ec9e127b96caeba4a7b4cc0f601eb595.tar.gz
Initial import of pyPgSQL 2.4
from pkgsrc-wip 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. This module is written in Python.
Diffstat (limited to 'databases/py-PgSQL')
-rw-r--r--databases/py-PgSQL/DESCR7
-rw-r--r--databases/py-PgSQL/Makefile27
-rw-r--r--databases/py-PgSQL/PLIST13
-rw-r--r--databases/py-PgSQL/buildlink2.mk22
-rw-r--r--databases/py-PgSQL/distinfo5
-rw-r--r--databases/py-PgSQL/patches/patch-aa31
6 files changed, 105 insertions, 0 deletions
diff --git a/databases/py-PgSQL/DESCR b/databases/py-PgSQL/DESCR
new file mode 100644
index 00000000000..6790d42bddb
--- /dev/null
+++ b/databases/py-PgSQL/DESCR
@@ -0,0 +1,7 @@
+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. This module is
+written in Python.
diff --git a/databases/py-PgSQL/Makefile b/databases/py-PgSQL/Makefile
new file mode 100644
index 00000000000..1334f42c023
--- /dev/null
+++ b/databases/py-PgSQL/Makefile
@@ -0,0 +1,27 @@
+# $NetBSD: Makefile,v 1.1.1.1 2003/09/09 13:46:24 recht Exp $
+#
+
+DISTNAME= pyPgSQL-2.4
+PKGNAME= ${PYPKGPREFIX}-${DISTNAME:S/py//}
+WRKSRC= ${WRKDIR}/pypgsql
+CATEGORIES= databases
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=pypgsql/}
+
+MAINTAINER= recht@NetBSD.org
+HOMEPAGE= http://pypgsql.sourceforge.net/
+COMMENT= Python DB-API 2.0 compliant interface to PostgreSQL
+
+USE_BUILDLINK2= YES
+PYDISTUTILSPKG= YES
+PYBINMODULE= YES
+PY_PATCHPLIST= YES
+
+post-install:
+ ${PYTHONBIN} -O ${LOCALBASE}/${PYLIB}/compileall.py \
+ ${LOCALBASE}/${PYSITELIB}/pyPgSQL
+
+.include "../../lang/python/extension.mk"
+.include "../../lang/python/application.mk"
+.include "../../time/py-mxDateTime/buildlink2.mk"
+.include "../../databases/postgresql-lib/buildlink2.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/databases/py-PgSQL/PLIST b/databases/py-PgSQL/PLIST
new file mode 100644
index 00000000000..59ca7be1a44
--- /dev/null
+++ b/databases/py-PgSQL/PLIST
@@ -0,0 +1,13 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2003/09/09 13:46:24 recht Exp $
+${PYSITELIB}/pyPgSQL/PgSQL.py
+${PYSITELIB}/pyPgSQL/PgSQL.pyc
+${PYSITELIB}/pyPgSQL/PgSQL.pyo
+${PYSITELIB}/pyPgSQL/__init__.py
+${PYSITELIB}/pyPgSQL/__init__.pyc
+${PYSITELIB}/pyPgSQL/__init__.pyo
+${PYSITELIB}/pyPgSQL/libpq/__init__.py
+${PYSITELIB}/pyPgSQL/libpq/__init__.pyc
+${PYSITELIB}/pyPgSQL/libpq/__init__.pyo
+${PYSITELIB}/pyPgSQL/libpq/libpqmodule.so
+@dirrm ${PYSITELIB}/pyPgSQL/libpq
+@dirrm ${PYSITELIB}/pyPgSQL
diff --git a/databases/py-PgSQL/buildlink2.mk b/databases/py-PgSQL/buildlink2.mk
new file mode 100644
index 00000000000..8b0dfa2d833
--- /dev/null
+++ b/databases/py-PgSQL/buildlink2.mk
@@ -0,0 +1,22 @@
+# $NetBSD: buildlink2.mk,v 1.1.1.1 2003/09/09 13:46:24 recht Exp $
+
+.include "../../lang/python/pyversion.mk"
+
+.if !defined(PYPGSQL_BUILDLINK2_MK)
+PYPGSQL_BUILDLINK2_MK= # defined
+
+BUILDLINK_PACKAGES+= pyPgSQL
+BUILDLINK_DEPENDS.pyPgSQL?= ${PYPKGPREFIX}-PgSQL>=2.4
+BUILDLINK_PKGSRCDIR.pyPgSQL?= ../../databases/py-PgSQL
+
+EVAL_PREFIX+= BUILDLINK_PREFIX.pyPgSQL=${PYPKGPREFIX}-PgSQL
+BUILDLINK_PREFIX.pyPgSQL_DEFAULT= ${LOCALBASE}
+
+.include "../../time/py-mxDateTime/buildlink2.mk"
+.include "../../databases/postgresql-lib/buildlink2.mk"
+
+BUILDLINK_TARGETS+= pyPgSQL-buildlink
+
+pyPgSQL-buildlink: _BUILDLINK_USE
+
+.endif # PYPGSQL_BUILDLINK2_MK
diff --git a/databases/py-PgSQL/distinfo b/databases/py-PgSQL/distinfo
new file mode 100644
index 00000000000..3ff97bf4481
--- /dev/null
+++ b/databases/py-PgSQL/distinfo
@@ -0,0 +1,5 @@
+$NetBSD: distinfo,v 1.1.1.1 2003/09/09 13:46:24 recht Exp $
+
+SHA1 (pyPgSQL-2.4.tar.gz) = 478135830e0bf4fc9496452ee3b88de4c218488f
+Size (pyPgSQL-2.4.tar.gz) = 152139 bytes
+SHA1 (patch-aa) = f8db2a753eb76bece779936fae69be60794c0327
diff --git a/databases/py-PgSQL/patches/patch-aa b/databases/py-PgSQL/patches/patch-aa
new file mode 100644
index 00000000000..982b370a344
--- /dev/null
+++ b/databases/py-PgSQL/patches/patch-aa
@@ -0,0 +1,31 @@
+$NetBSD: patch-aa,v 1.1.1.1 2003/09/09 13:46:24 recht Exp $
+
+--- libpqmodule.c.orig 2003-06-17 03:28:30.000000000 +0200
++++ libpqmodule.c 2003-07-26 15:26:34.000000000 +0200
+@@ -791,7 +791,7 @@
+ return PgInt8_FromString(s, (char **)NULL, 10);
+ }
+
+- PyErr_SetString(PyExc_TypeError, "a string or numeric is requireed");
++ PyErr_SetString(PyExc_TypeError, "a string or numeric is required");
+ return (PyObject *)NULL;
+ }
+ #endif
+@@ -855,7 +855,7 @@
+ return PgInt2_FromString(s, (char **)NULL, 10);
+ }
+
+- PyErr_SetString(PyExc_TypeError, "a string or numeric is requireed");
++ PyErr_SetString(PyExc_TypeError, "a string or numeric is required");
+ return (PyObject *)NULL;
+ }
+
+@@ -907,7 +907,7 @@
+ return libPQbool_FromString(self, args);
+ }
+
+- PyErr_SetString(PyExc_TypeError, "a string or numeric is requireed");
++ PyErr_SetString(PyExc_TypeError, "a string or numeric is required");
+ return (PyObject *)NULL;
+ }
+