From 3f6e6e5c9ac4321b6fcd97abf126fb2f98afa3f4 Mon Sep 17 00:00:00 2001 From: jedgar Date: Fri, 14 Jan 2000 15:00:08 +0000 Subject: Python MySQL module allows you to access easily a MySQL database via Python. PR: 13583 Submitted by: Dominik Rothert --- databases/py-MySQL/Makefile | 36 ++++++++++++++++++++++++++++++++++++ databases/py-MySQL/distinfo | 1 + databases/py-MySQL/files/patch-aa | 38 ++++++++++++++++++++++++++++++++++++++ databases/py-MySQL/pkg-comment | 1 + databases/py-MySQL/pkg-descr | 4 ++++ databases/py-MySQL/pkg-plist | 1 + 6 files changed, 81 insertions(+) create mode 100644 databases/py-MySQL/Makefile create mode 100644 databases/py-MySQL/distinfo create mode 100644 databases/py-MySQL/files/patch-aa create mode 100644 databases/py-MySQL/pkg-comment create mode 100644 databases/py-MySQL/pkg-descr create mode 100644 databases/py-MySQL/pkg-plist (limited to 'databases/py-MySQL') 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 +# +# $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 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; jres,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; jres,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 -- cgit v1.1