From: Jan Rękorajski Date: Fri, 2 Oct 2015 21:15:58 +0000 (+0200) Subject: - fix bitnes detection X-Git-Tag: auto/th/python-mysql-connector-2.1.3-2~1 X-Git-Url: http://git.pld-linux.org/gitweb.cgi?a=commitdiff_plain;h=81c16330a7aff5e079882a567ef0230380fcd12c;p=packages%2Fpython-mysql-connector.git - fix bitnes detection --- 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" 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