[arch-commits] Commit in mysql-python/repos (3 files)

Felix Yan felixonmars at archlinux.org
Wed Jan 16 15:17:37 UTC 2019


    Date: Wednesday, January 16, 2019 @ 15:17:36
  Author: felixonmars
Revision: 344263

archrelease: copy trunk to staging-x86_64

Added:
  mysql-python/repos/staging-x86_64/
  mysql-python/repos/staging-x86_64/PKGBUILD
    (from rev 344262, mysql-python/trunk/PKGBUILD)
  mysql-python/repos/staging-x86_64/mariadb-10.2-reconnect.patch
    (from rev 344262, mysql-python/trunk/mariadb-10.2-reconnect.patch)

------------------------------+
 PKGBUILD                     |   30 ++++++++++++++++++++++++++++++
 mariadb-10.2-reconnect.patch |   26 ++++++++++++++++++++++++++
 2 files changed, 56 insertions(+)

Copied: mysql-python/repos/staging-x86_64/PKGBUILD (from rev 344262, mysql-python/trunk/PKGBUILD)
===================================================================
--- staging-x86_64/PKGBUILD	                        (rev 0)
+++ staging-x86_64/PKGBUILD	2019-01-16 15:17:36 UTC (rev 344263)
@@ -0,0 +1,30 @@
+# Maintainer: Angel Velasquez <angvp at archlinux.org>
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: damir <damir at archlinux.org>
+
+pkgname=mysql-python
+pkgver=1.2.5
+pkgrel=3
+pkgdesc="MySQL support for Python"
+arch=("x86_64")
+url="http://mysql-python.sourceforge.net/"
+license=('GPL2')
+depends=('python2' 'mariadb-libs')
+makedepends=('python2-setuptools')
+source=("https://pypi.python.org/packages/a5/e9/51b544da85a36a68debe7a7091f068d802fc515a3a202652828c73453cad/MySQL-python-1.2.5.zip"
+        mariadb-10.2-reconnect.patch)
+sha512sums=('37521c6fd855c4cde495cc8ec085aca79c2d441a6e3710759385bf2e2c17f43d3311cf1166663892829d2e3999c419443c358c7031cdda225ac44611ced188d0'
+            'c46e3efdb856d1d083204cd3216be2996941b49a6bae7cfc774bd0b86f7e5344bcb0035e17acc6bb17740047bf1827d1a92af8c8971908e741e1e6dda8c868e2')
+
+prepare() {
+  cd "${srcdir}/MySQL-python-${pkgver}"
+
+  # https://github.com/PyMySQL/mysqlclient-python/issues/176
+  sed -i 's/\r//' _mysql.c
+  patch -Np1 -i ../mariadb-10.2-reconnect.patch
+}
+
+package() {
+  cd "${srcdir}/MySQL-python-${pkgver}"
+  python2 setup.py install --root="${pkgdir}" --optimize=1
+}

Copied: mysql-python/repos/staging-x86_64/mariadb-10.2-reconnect.patch (from rev 344262, mysql-python/trunk/mariadb-10.2-reconnect.patch)
===================================================================
--- staging-x86_64/mariadb-10.2-reconnect.patch	                        (rev 0)
+++ staging-x86_64/mariadb-10.2-reconnect.patch	2019-01-16 15:17:36 UTC (rev 344263)
@@ -0,0 +1,26 @@
+From 1693848c9f6ca863868d94d63499830f7f4f3a1f Mon Sep 17 00:00:00 2001
+From: INADA Naoki <methane at users.noreply.github.com>
+Date: Wed, 7 Jun 2017 15:46:20 +0900
+Subject: [PATCH] Fix compile error with MariaDB 10.2. (#177)
+
+Don't touch MYSQL.reconnect directly.
+---
+ _mysql.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/_mysql.c b/_mysql.c
+index c3ebc16..8295f6c 100644
+--- a/_mysql.c
++++ b/_mysql.c
+@@ -1908,7 +1908,10 @@ _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) {
++		my_bool recon = reconnect;
++		mysql_options(&self->connection, MYSQL_OPT_RECONNECT, &recon);
++	}
+ 	Py_BEGIN_ALLOW_THREADS
+ 	r = mysql_ping(&(self->connection));
+ 	Py_END_ALLOW_THREADS



More information about the arch-commits mailing list