bpo-43466: Link with libz in PY_UNSUPPORTED_OPENSSL_BUILD path (GH-25587)

Some OpenSSL build flavors need libz for compression support.
This commit is contained in:
Christian Heimes 2021-04-26 15:13:34 +02:00 committed by GitHub
parent 666991fc59
commit 5f87915d4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -2466,7 +2466,8 @@ class PyBuildExt(build_ext):
extra_linker_args.append(f"-Wl,--exclude-libs,lib{lib}.a")
openssl_extension_kwargs["extra_link_args"] = extra_linker_args
# don't link OpenSSL shared libraries.
openssl_extension_kwargs["libraries"] = []
# include libz for OpenSSL build flavors with compression support
openssl_extension_kwargs["libraries"] = ["z"]
self.add(
Extension(