From 4a48401c75303fa04421d0fa3ae8ded529103f49 Mon Sep 17 00:00:00 2001 From: Inada Naoki Date: Fri, 29 Nov 2019 17:03:36 +0900 Subject: [PATCH] Remove -lcrypto -lssl -lz (#409) --- setup_posix.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/setup_posix.py b/setup_posix.py index dd88fec..db82b3c 100644 --- a/setup_posix.py +++ b/setup_posix.py @@ -90,6 +90,12 @@ def get_config(): extra_objects.append(os.path.join(library_dirs[0], 'lib%s.a' % client)) if client in libraries: libraries.remove(client) + else: + # mysql_config may have "-lmysqlclient -lz -lssl -lcrypto", but zlib and + # ssl is not used by _mysql. They are needed only for static build. + for L in ('crypto', 'ssl', 'z'): + if L in libraries: + libraries.remove(L) name = "mysqlclient" metadata['name'] = name