From 7c1b2cf278b6c3edd1d0db8aeac467948aeb0c35 Mon Sep 17 00:00:00 2001 From: Inada Naoki Date: Fri, 29 Nov 2019 16:53:07 +0900 Subject: [PATCH] Remove -lcrypto -lssl -lz --- setup_posix.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/setup_posix.py b/setup_posix.py index dd88fec6..db82b3c6 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