Skip to content

Commit 81f8860

Browse files
committed
Fix new ssl libraries on msi and failing unitest on Py2.7
The ssl libraries "ssleay32.dll" and "libeay32.dll" had change for the "libssl-1_1.dll" and "libcrypto-1_1.dll" on 32bit msi packages and "libssl-1_1-x64.dll" and "libcrypto-1_1-x64.dll" for the 64bit msi packages. This patch made the adecuate changes to include these new libraries. In addition this patch avoids a timeout issue on the tests: bugs.Bug865859.test_reassign_connection (using MySQLConnection) bugs.BugOra18144971.test_prepared_statement (using CMySQLConnection) On el7 with Pyv2.7 generated by the opening of a subprocess to load the distribution information from lsb_release.
1 parent 3b6428b commit 81f8860

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

cpyint

lib/cpy_distutils.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,12 @@ def _copy_vendor_libraries(self):
401401

402402
if os.name == "nt":
403403
mysql_capi = os.path.join(self.with_mysql_capi, "bin")
404-
vendor_libs.append((mysql_capi, ["ssleay32.dll", "libeay32.dll"]))
404+
if ARCH_64BIT:
405+
vendor_libs.append((mysql_capi, ["libssl-1_1-x64.dll",
406+
"libcrypto-1_1-x64.dll"]))
407+
else:
408+
vendor_libs.append((mysql_capi, ["libssl-1_1.dll",
409+
"libcrypto-1_1.dll"]))
405410
# Bundle libmysql.dll
406411
src = os.path.join(self.with_mysql_capi, "lib", "libmysql.dll")
407412
dst = os.getcwd()

lib/mysql/connector/utils.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -427,11 +427,12 @@ def linux_distribution():
427427
distro.get("distrib_release", ""),
428428
distro.get("distrib_codename", ""))
429429

430-
distro = _parse_lsb_release_command()
431-
if distro:
432-
return (distro.get("distributor_id", ""),
433-
distro.get("release", ""),
434-
distro.get("codename", ""))
430+
if not PY2:
431+
distro = _parse_lsb_release_command()
432+
if distro:
433+
return (distro.get("distributor_id", ""),
434+
distro.get("release", ""),
435+
distro.get("codename", ""))
435436

436437
distro = _parse_os_release()
437438
if distro:

0 commit comments

Comments
 (0)