[packages/python-mysql-connector] - fix bitnes detection

baggins baggins at pld-linux.org
Fri Oct 2 23:16:14 CEST 2015


commit 81c16330a7aff5e079882a567ef0230380fcd12c
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Fri Oct 2 23:15:58 2015 +0200

    - fix bitnes detection

 32bit.patch                 | 20 ++++++++++++++++++++
 python-mysql-connector.spec |  2 ++
 2 files changed, 22 insertions(+)
---
diff --git a/python-mysql-connector.spec b/python-mysql-connector.spec
index 9bff94e..c60c1ec 100644
--- a/python-mysql-connector.spec
+++ b/python-mysql-connector.spec
@@ -16,6 +16,7 @@ License:	GPL v2
 Group:		Libraries/Python
 Source0:	http://cdn.mysql.com/Downloads/Connector-Python/mysql-connector-python-%{version}.zip
 # Source0-md5:	710479afc4f7895207c8f96f91eb5385
+Patch0:		32bit.patch
 URL:		http://dev.mysql.com/doc/connector-python/en/
 BuildRequires:	mysql-devel
 BuildRequires:	python-devel
@@ -44,6 +45,7 @@ driver. An interface to the popular MySQL database server for Python.
 
 %prep
 %setup -q -n mysql-connector-python-%{version}
+%patch0 -p1
 
 %build
 %{__python} setup.py build
diff --git a/32bit.patch b/32bit.patch
new file mode 100644
index 0000000..ecdaa4d
--- /dev/null
+++ b/32bit.patch
@@ -0,0 +1,20 @@
+--- mysql-connector-python-2.1.3/lib/cpy_distutils.py~
++++ mysql-connector-python-2.1.3/lib/cpy_distutils.py
+@@ -131,7 +131,7 @@ def unix_lib_is64bit(lib_file):
+     stdout = prc.communicate()[0]
+     stdout = stdout.split(':')[1]
+     log.debug("# lib_file {0} stdout: {1}".format(lib_file, stdout))
+-    if 'x86_64' in stdout or 'x86-64' in stdout or '32-bit' not in stdout:
++    if 'x86_64' in stdout or 'x86-64' in stdout and '32-bit' not in stdout:
+         return True
+ 
+     return False
+@@ -213,7 +213,7 @@
+                 "be executed: {0}".format(str(exc)))
+ 
+         if stdout:
+-            if '64' in stdout:
++            if '64' in stdout and not '32-bit' in stdout:
+                 info['arch'] = "x86_64"
+             else:
+                 info['arch'] = "i386"
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-mysql-connector.git/commitdiff/81c16330a7aff5e079882a567ef0230380fcd12c



More information about the pld-cvs-commit mailing list