summaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2021-11-22 13:52:29 (GMT)
committerGitHub <noreply@github.com>2021-11-22 13:52:29 (GMT)
commitd9cedabeba0d87799f99c0717e81743a1c2d34ce (patch)
treeaaf2829609eb71598aeba5c838e8bb76608b0a24 /setup.py
parentb451673f93465a27ee61e408190ee61cb9dbd5b6 (diff)
downloadcpython-d9cedabeba0d87799f99c0717e81743a1c2d34ce.zip
cpython-d9cedabeba0d87799f99c0717e81743a1c2d34ce.tar.gz
cpython-d9cedabeba0d87799f99c0717e81743a1c2d34ce.tar.bz2
bpo-45847: Port compression libs to PY_STDLIB_MOD (GH-29702)
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py29
1 files changed, 4 insertions, 25 deletions
diff --git a/setup.py b/setup.py
index d4eff36..b9b48b2 100644
--- a/setup.py
+++ b/setup.py
@@ -1365,38 +1365,17 @@ class PyBuildExt(build_ext):
def detect_compress_exts(self):
# Andrew Kuchling's zlib module.
- have_zlib = sysconfig.get_config_var("HAVE_LIBZ")
- if have_zlib:
- self.add(Extension('zlib', ['zlibmodule.c'],
- libraries=['z']))
- else:
- self.missing.append('zlib')
+ self.addext(Extension('zlib', ['zlibmodule.c']))
# Helper module for various ascii-encoders. Uses zlib for an optimized
# crc32 if we have it. Otherwise binascii uses its own.
- if have_zlib:
- define_macros = [('USE_ZLIB_CRC32', None)]
- libraries = ['z']
- else:
- define_macros = None
- libraries = []
- self.add(Extension('binascii', ['binascii.c'],
- define_macros=define_macros,
- libraries=libraries))
+ self.addext(Extension('binascii', ['binascii.c']))
# Gustavo Niemeyer's bz2 module.
- if sysconfig.get_config_var("HAVE_LIBBZ2"):
- self.add(Extension('_bz2', ['_bz2module.c'],
- libraries=['bz2']))
- else:
- self.missing.append('_bz2')
+ self.addext(Extension('_bz2', ['_bz2module.c']))
# LZMA compression support.
- if sysconfig.get_config_var("HAVE_LIBLZMA"):
- self.add(Extension('_lzma', ['_lzmamodule.c'],
- libraries=['lzma']))
- else:
- self.missing.append('_lzma')
+ self.addext(Extension('_lzma', ['_lzmamodule.c']))
def detect_expat_elementtree(self):
# Interface to the Expat XML parser