From 9aa8a5118474b917c0d3b53a1023dd39ee28da54 Mon Sep 17 00:00:00 2001 From: shell Date: Wed, 18 Apr 2001 17:47:05 +0000 Subject: [PATCH] Import py-mysql-0.3.5 Python interface to MySQL-3.22 and 3.23 MySQLdb is an interface to the popular MySQL database server for Python. The design goals are: - Compliance with Python database API version 2.0 - Thread-safety - Thread-friendliness (threads will not block each other) - Compatibility with MySQL 3.22 and 3.23 --- databases/py-mysql/Makefile | 42 +++++++++++++++++++++++ databases/py-mysql/files/md5 | 3 ++ databases/py-mysql/patches/patch-setup_py | 11 ++++++ databases/py-mysql/pkg/DESCR | 17 +++++++++ databases/py-mysql/pkg/PLIST | 28 +++++++++++++++ 5 files changed, 101 insertions(+) create mode 100644 databases/py-mysql/Makefile create mode 100644 databases/py-mysql/files/md5 create mode 100644 databases/py-mysql/patches/patch-setup_py create mode 100644 databases/py-mysql/pkg/DESCR create mode 100644 databases/py-mysql/pkg/PLIST diff --git a/databases/py-mysql/Makefile b/databases/py-mysql/Makefile new file mode 100644 index 00000000000..24445caba1a --- /dev/null +++ b/databases/py-mysql/Makefile @@ -0,0 +1,42 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2001/04/18 17:47:05 shell Exp $ + +COMMENT= 'python interface to MySQL' + +VERSION= 0.3.5 +DISTNAME= MySQL-python-${VERSION} +PKGNAME= py-mysql-${VERSION} +CATEGORIES= databases +NEED_VERSION= 1.399 +MASTER_SITES= http://dustman.net/andy/python/MySQLdb/${VERSION}/ +HOMEPAGE= http://dustman.net/andy/python/MySQLdb/ + +MAINTAINER= Shell Hung + +PERMIT_PACKAGE_FTP= Yes +PERMIT_PACKAGE_CDROM= Yes +PERMIT_DISTFILES_FTP= Yes +PERMIT_DISTFILES_CDROM= Yes + +BUILD_DEPENDS= python2.0::lang/python +LIB_DEPENDS= mysqlclient::databases/mysql +NO_CONFIGURE= Yes + +DOC_DIR= ${PREFIX}/share/examples/MySQL-python +DOC_SCRIPTS= dbtrainer0 dbtrainer1 dbtrainer2 dbtrainer3 \ + dbtrainer4 +DOC_FILES= README test.sql + +do-build: + cd ${WRKSRC}; python ./setup.py build --build-base=${WRKSRC} + +do-install: + cd ${WRKSRC}; python ./setup.py install --prefix=${PREFIX} + ${INSTALL_DATA_DIR} ${DOC_DIR} +.for i in ${DOC_SCRIPTS} + ${INSTALL_SCRIPT} ${WRKBUILD}/examples/$i ${DOC_DIR}/$i +.endfor +.for i in ${DOC_FILES} + ${INSTALL_DATA} ${WRKBUILD}/examples/$i ${DOC_DIR}/$i +.endfor + +.include diff --git a/databases/py-mysql/files/md5 b/databases/py-mysql/files/md5 new file mode 100644 index 00000000000..08b8b8b72e1 --- /dev/null +++ b/databases/py-mysql/files/md5 @@ -0,0 +1,3 @@ +MD5 (MySQL-python-0.3.5.tar.gz) = 16621bcc8054361c00d52a177d087da7 +RMD160 (MySQL-python-0.3.5.tar.gz) = 2592512e044d1d9f5e641e401ae5f946fe60a121 +SHA1 (MySQL-python-0.3.5.tar.gz) = e351ba529858c85e46aac17e7adcc421b48813a1 diff --git a/databases/py-mysql/patches/patch-setup_py b/databases/py-mysql/patches/patch-setup_py new file mode 100644 index 00000000000..f812345322e --- /dev/null +++ b/databases/py-mysql/patches/patch-setup_py @@ -0,0 +1,11 @@ +--- setup.py.orig Fri Apr 6 00:05:43 2001 ++++ setup.py Fri Apr 6 00:06:01 2001 +@@ -24,7 +24,7 @@ + libraries = [mysqlclient, "z"] + runtime_library_dirs = [] + extra_objects = [] +-elif sys.platform == "freebsd4": ++elif sys.platform in ("freebsd4", "openbsd2"): + include_dirs = ['/usr/local/include/mysql'] + library_dirs = ['/usr/local/lib/mysql'] + libraries = [mysqlclient, "z"] diff --git a/databases/py-mysql/pkg/DESCR b/databases/py-mysql/pkg/DESCR new file mode 100644 index 00000000000..5cccd8b88ab --- /dev/null +++ b/databases/py-mysql/pkg/DESCR @@ -0,0 +1,17 @@ +Python interface to MySQL-3.22 and 3.23 + +MySQLdb is an interface to the popular MySQL database server for +Python. The design goals are: + +- Compliance with Python database API version 2.0 +- Thread-safety +- Thread-friendliness (threads will not block each other) +- Compatibility with MySQL 3.22 and 3.23 + +This module should be mostly compatible with an older interface +written by Joe Skinner and others. However, the older version is +a) not thread-friendly, b) written for MySQL 3.21, c) apparently +not actively maintained. No code from that version is used in +MySQLdb. MySQLdb is distributed free of charge under a license +derived from the Python license. + diff --git a/databases/py-mysql/pkg/PLIST b/databases/py-mysql/pkg/PLIST new file mode 100644 index 00000000000..cb3fad446d6 --- /dev/null +++ b/databases/py-mysql/pkg/PLIST @@ -0,0 +1,28 @@ +@comment $OpenBSD: PLIST,v 1.1.1.1 2001/04/18 17:47:05 shell Exp $ +lib/python2.0/site-packages/CompatMysqldb.py +lib/python2.0/site-packages/CompatMysqldb.pyc +lib/python2.0/site-packages/MySQLdb.py +lib/python2.0/site-packages/MySQLdb.pyc +lib/python2.0/site-packages/_mysql.so +lib/python2.0/site-packages/_mysql_const/CLIENT.py +lib/python2.0/site-packages/_mysql_const/CLIENT.pyc +lib/python2.0/site-packages/_mysql_const/CR.py +lib/python2.0/site-packages/_mysql_const/CR.pyc +lib/python2.0/site-packages/_mysql_const/ER.py +lib/python2.0/site-packages/_mysql_const/ER.pyc +lib/python2.0/site-packages/_mysql_const/FIELD_TYPE.py +lib/python2.0/site-packages/_mysql_const/FIELD_TYPE.pyc +lib/python2.0/site-packages/_mysql_const/FLAG.py +lib/python2.0/site-packages/_mysql_const/FLAG.pyc +lib/python2.0/site-packages/_mysql_const/REFRESH.py +lib/python2.0/site-packages/_mysql_const/REFRESH.pyc +lib/python2.0/site-packages/_mysql_const/__init__.py +lib/python2.0/site-packages/_mysql_const/__init__.pyc +share/examples/MySQL-python/README +share/examples/MySQL-python/dbtrainer0 +share/examples/MySQL-python/dbtrainer1 +share/examples/MySQL-python/dbtrainer2 +share/examples/MySQL-python/dbtrainer3 +share/examples/MySQL-python/dbtrainer4 +share/examples/MySQL-python/test.sql +@dirrm share/examples/MySQL-python