Skip to content

Commit 8ed2fae

Browse files
committed
Add more libmysql search paths.
* Added libmysqlclient.so.18 and libmysqlclient fallback
1 parent 32d79b0 commit 8ed2fae

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

MySQLdb/libmysql.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,12 @@ class MYSQL_FIELD(ctypes.Structure):
4444

4545
c = None
4646
# Prefer the higher version, obscure.
47-
for lib in ["libmysqlclient.so.16", "libmysqlclient.so.15", "mysqlclient", "libmysqlclient.18.dylib"]:
47+
48+
_searchpaths = ["libmysqlclient.so.18", "libmysqlclient.so.16",
49+
"libmysqlclient.so.15", "mysqlclient",
50+
"libmysqlclient.18.dylib", "libmysqlclient.so"]
51+
52+
for lib in _searchpaths:
4853
try:
4954
c = ctypes.CDLL(lib)
5055
except OSError:

0 commit comments

Comments
 (0)