]> git.pld-linux.org Git - packages/python-mysql-connector.git/commitdiff
- fix bitnes detection
authorJan Rękorajski <baggins@pld-linux.org>
Fri, 2 Oct 2015 21:15:58 +0000 (23:15 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Fri, 2 Oct 2015 21:15:58 +0000 (23:15 +0200)
32bit.patch [new file with mode: 0644]
python-mysql-connector.spec

diff --git a/32bit.patch b/32bit.patch
new file mode 100644 (file)
index 0000000..ecdaa4d
--- /dev/null
@@ -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"
index 9bff94e4b6c0ec0c8cf14df50d07f5aed0ecea0a..c60c1ecb4ba0595cd8af9a7f0dff2ad423d690d5 100644 (file)
@@ -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
This page took 0.183012 seconds and 4 git commands to generate.