aboutsummaryrefslogtreecommitdiffstats
path: root/unmaintained/py-mysqldb
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2019-09-09 08:05:29 -0300
committerLeo <thinkabit.ukim@gmail.com>2019-09-09 09:43:43 -0300
commitfe39065228bd887b4ac1cdf220b4d7f4742014d5 (patch)
tree47ab7c7910d1bae7776974e0aff6c02a0d566aff /unmaintained/py-mysqldb
parentf34f5f1e018f7d088dde93ae7900025c45cabcc2 (diff)
downloadaports-fe39065228bd887b4ac1cdf220b4d7f4742014d5.tar.bz2
aports-fe39065228bd887b4ac1cdf220b4d7f4742014d5.tar.xz
unmaintained/py-mysqldb: move from community
- Python2 only - Work in upstream for 1.3.0 release that supports python3 - There is a 2.0 version that will be named 'moist'
Diffstat (limited to 'unmaintained/py-mysqldb')
-rw-r--r--unmaintained/py-mysqldb/APKBUILD28
-rw-r--r--unmaintained/py-mysqldb/mariadb.patch22
2 files changed, 50 insertions, 0 deletions
diff --git a/unmaintained/py-mysqldb/APKBUILD b/unmaintained/py-mysqldb/APKBUILD
new file mode 100644
index 0000000000..8cb7045ec5
--- /dev/null
+++ b/unmaintained/py-mysqldb/APKBUILD
@@ -0,0 +1,28 @@
+# Contributor: Ɓukasz Jendrysik <scadu@yandex.com>
+# Maintainer: Francesco Colista <francesco.colista@gmail.com>
+pkgname=py-mysqldb
+pkgver=1.2.5
+pkgrel=1
+pkgdesc="MySQL database connector for Python (legacy version)"
+url="https://github.com/farcepest/MySQLdb1"
+arch="all"
+license="GPL"
+depends="python2"
+makedepends="mariadb-connector-c-dev python2-dev py-setuptools"
+source="https://files.pythonhosted.org/packages/source/M/MySQL-python/MySQL-python-$pkgver.zip
+ mariadb.patch"
+
+builddir="$srcdir"/MySQL-python-$pkgver
+
+build() {
+ cd "$builddir"
+ python2 setup.py build
+}
+
+package() {
+ cd "$builddir"
+ python2 setup.py install --prefix=/usr --root="$pkgdir"
+}
+
+sha512sums="37521c6fd855c4cde495cc8ec085aca79c2d441a6e3710759385bf2e2c17f43d3311cf1166663892829d2e3999c419443c358c7031cdda225ac44611ced188d0 MySQL-python-1.2.5.zip
+fcb15e47a1cc5faa9c6ef33826a661d2728a0bd59ee2d35f7046b5079875741574a3a80ff95f86b419fd6ae58d59fce8f391b1d0630aaec034098054683487ca mariadb.patch"
diff --git a/unmaintained/py-mysqldb/mariadb.patch b/unmaintained/py-mysqldb/mariadb.patch
new file mode 100644
index 0000000000..ed7d496f63
--- /dev/null
+++ b/unmaintained/py-mysqldb/mariadb.patch
@@ -0,0 +1,22 @@
+diff --git a/_mysql.c b/_mysql.c
+index f081346..1c434d3 100644
+--- a/_mysql.c
++++ b/_mysql.c
+@@ -40,8 +40,6 @@ PERFORMANCE OF THIS SOFTWARE.
+ #include "structmember.h"
+ #if defined(MS_WINDOWS)
+ #include <config-win.h>
+-#else
+-#include "my_config.h"
+ #endif
+ #include "mysql.h"
+ #include "mysqld_error.h"
+@@ -2002,7 +2000,7 @@ _mysql_ConnectionObject_ping(
+ int r, reconnect = -1;
+ if (!PyArg_ParseTuple(args, "|I", &reconnect)) return NULL;
+ check_connection(self);
+- if ( reconnect != -1 ) self->connection.reconnect = reconnect;
++ if ( reconnect != -1 ) mysql_options(&self->connection, MYSQL_OPT_RECONNECT, &reconnect);
+ Py_BEGIN_ALLOW_THREADS
+ r = mysql_ping(&(self->connection));
+ Py_END_ALLOW_THREADS