summaryrefslogtreecommitdiffstats
path: root/databases/py-MySQL
diff options
context:
space:
mode:
authorjedgar <jedgar@FreeBSD.org>2000-01-14 15:00:08 +0000
committerjedgar <jedgar@FreeBSD.org>2000-01-14 15:00:08 +0000
commit3f6e6e5c9ac4321b6fcd97abf126fb2f98afa3f4 (patch)
treed0c958350be199b41be63d50918929ea2fc7b71e /databases/py-MySQL
parentba11bd64ca62b5f2e416b3a016531022e20800c8 (diff)
downloadFreeBSD-ports-3f6e6e5c9ac4321b6fcd97abf126fb2f98afa3f4.zip
FreeBSD-ports-3f6e6e5c9ac4321b6fcd97abf126fb2f98afa3f4.tar.gz
Python MySQL module allows you to access easily a MySQL database
via Python. PR: 13583 Submitted by: Dominik Rothert <dr@domix.de>
Diffstat (limited to 'databases/py-MySQL')
-rw-r--r--databases/py-MySQL/Makefile36
-rw-r--r--databases/py-MySQL/distinfo1
-rw-r--r--databases/py-MySQL/files/patch-aa38
-rw-r--r--databases/py-MySQL/pkg-comment1
-rw-r--r--databases/py-MySQL/pkg-descr4
-rw-r--r--databases/py-MySQL/pkg-plist1
6 files changed, 81 insertions, 0 deletions
diff --git a/databases/py-MySQL/Makefile b/databases/py-MySQL/Makefile
new file mode 100644
index 0000000..a15ed7f
--- /dev/null
+++ b/databases/py-MySQL/Makefile
@@ -0,0 +1,36 @@
+# New ports collection makefile for: py-MySQL
+# Version required: 1.4
+# Date created: 05 September 1999
+# Whom: Dominik Rothert <dr@domix.de>
+#
+# $FreeBSD$
+#
+
+DISTNAME= MySQLmodule-1.4
+PKGNAME= py-MySQL-1.4
+CATEGORIES= databases python
+MASTER_SITES= http://www.mysql.com/Contrib/
+
+MAINTAINER= dr@domix.de
+
+BUILD_DEPENDS= python:${PORTSDIR}/lang/python
+LIB_DEPENDS= mysqlclient.6:${PORTSDIR}/databases/mysql322-client
+RUN_DEPENDS= python:${PORTSDIR}/lang/python
+
+pre-build:
+ ${CP} ${FILESDIR}/Makefile ${WRKSRC}/Makefile
+
+do-install:
+ ${INSTALL_DATA} ${WRKSRC}/MySQLmodule.so ${PREFIX}/lib/python1.5/site-packages
+.if !defined(NOPORTDOCS)
+ ${MKDIR} ${PREFIX}/share/doc/py-MySQL
+ ${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/py-MySQL
+.endif
+
+post-install:
+.if !defined(NOPORTDOCS)
+ ${ECHO} "share/doc/py-MySQL/README" >> ${TMPPLIST}
+ ${ECHO} "@dirrm share/doc/py-MySQL" >> ${TMPPLIST}
+.endif
+
+.include <bsd.port.mk>
diff --git a/databases/py-MySQL/distinfo b/databases/py-MySQL/distinfo
new file mode 100644
index 0000000..f317dfb
--- /dev/null
+++ b/databases/py-MySQL/distinfo
@@ -0,0 +1 @@
+MD5 (MySQLmodule-1.4.tar.gz) = 5da13c9806450e085060e80b4e60a51e
diff --git a/databases/py-MySQL/files/patch-aa b/databases/py-MySQL/files/patch-aa
new file mode 100644
index 0000000..df4306b
--- /dev/null
+++ b/databases/py-MySQL/files/patch-aa
@@ -0,0 +1,38 @@
+--- MySQLmodule.c.orig Sat Oct 3 05:14:18 1998
++++ MySQLmodule.c Fri Jan 14 08:40:00 2000
+@@ -232,7 +232,7 @@
+ PyObject *rowlist, *fieldobj;
+ MYSQL_FIELD *tf;
+ int i, n;
+- unsigned int *lengths;
++ unsigned long *lengths;
+
+ n = mysql_num_fields(res);
+ lengths = mysql_fetch_lengths(res);
+@@ -381,7 +381,7 @@
+ if (reslist == NULL) return NULL;
+ n = mysql_num_fields(res);
+ for (i = 0; i < n; i++) {
+- tf = &(mysql_fetch_field_direct(res, i));
++ tf = mysql_fetch_field_direct(res, i);
+ if (tf == NULL) {
+ if (res->handle && mysql_error(res->handle)[0] != 0) {
+ PyErr_SetString(MySQLError,mysql_error(res->handle));
+@@ -1122,7 +1122,7 @@
+ if (rows > 0) {
+ cols = mysql_num_fields(self->res);
+ for (j=0; j<cols; j++) {
+- tf = &(mysql_fetch_field_direct(self->res,j));
++ tf = mysql_fetch_field_direct(self->res,j);
+ if (tf == NULL) {
+ if (self->res->handle && mysql_error(self->res->handle)[0] != 0) {
+ PyErr_SetString(MySQLError,mysql_error(self->res->handle));
+@@ -1144,7 +1144,7 @@
+ rowlist = PyList_GetItem(datalist,i);
+ if (rowlist == NULL) goto error;
+ for (j=0; j<cols; j++) {
+- tf = &(mysql_fetch_field_direct(self->res,j));
++ tf = mysql_fetch_field_direct(self->res,j);
+ if (tf == NULL) {
+ if (self->res->handle && mysql_error(self->res->handle)[0] != 0) {
+ PyErr_SetString(MySQLError,mysql_error(self->res->handle));
diff --git a/databases/py-MySQL/pkg-comment b/databases/py-MySQL/pkg-comment
new file mode 100644
index 0000000..00bccc1
--- /dev/null
+++ b/databases/py-MySQL/pkg-comment
@@ -0,0 +1 @@
+access a MySQL database through Python
diff --git a/databases/py-MySQL/pkg-descr b/databases/py-MySQL/pkg-descr
new file mode 100644
index 0000000..834d53e
--- /dev/null
+++ b/databases/py-MySQL/pkg-descr
@@ -0,0 +1,4 @@
+You can easily access a MySQL database through the Python MySQL module.
+
+Before using the Python MySQL functions, the module must be imported with
+"import MySQL".
diff --git a/databases/py-MySQL/pkg-plist b/databases/py-MySQL/pkg-plist
new file mode 100644
index 0000000..1cb35e1
--- /dev/null
+++ b/databases/py-MySQL/pkg-plist
@@ -0,0 +1 @@
+lib/python1.5/site-packages/MySQLmodule.so
OpenPOWER on IntegriCloud