aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2021-12-09 15:58:30 +0100
committerMichał Górny <mgorny@gentoo.org>2023-06-07 15:30:06 +0200
commitb0e507e3981fd8242d3b1f80effcb87b66345c42 (patch)
tree41850554f6b6f5f7cd9fab711c7469ca65590c55
parentssl: Hard-disable SSLv3 to avoid automagic deps (diff)
downloadcpython-b0e507e3981fd8242d3b1f80effcb87b66345c42.tar.gz
cpython-b0e507e3981fd8242d3b1f80effcb87b66345c42.tar.bz2
cpython-b0e507e3981fd8242d3b1f80effcb87b66345c42.zip
Temporary hack: handle all extensions via .addext()
Use .addext() for all modules in order to enable Makefile control over building them.
-rw-r--r--configure.ac6
-rw-r--r--setup.py18
2 files changed, 15 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac
index 1c25abd65a0..e4f1a03cbc6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7034,6 +7034,12 @@ PY_STDLIB_MOD_SIMPLE([_codecs_tw])
PY_STDLIB_MOD_SIMPLE([_multibytecodec])
PY_STDLIB_MOD_SIMPLE([unicodedata])
+dnl Gentoo hack
+PY_STDLIB_MOD_SIMPLE([_curses])
+PY_STDLIB_MOD_SIMPLE([_curses_panel])
+PY_STDLIB_MOD_SIMPLE([_dbm])
+PY_STDLIB_MOD_SIMPLE([readline])
+
dnl By default we always compile these even when OpenSSL is available
dnl (issue #14693). The modules are small.
PY_STDLIB_MOD([_md5], [test "$with_builtin_md5" = yes])
diff --git a/setup.py b/setup.py
index 4f122b62e0e..c207a6c5cd2 100644
--- a/setup.py
+++ b/setup.py
@@ -1111,11 +1111,11 @@ class PyBuildExt(build_ext):
['/usr/lib/termcap'],
'termcap'):
readline_libs.append('termcap')
- self.add(Extension('readline', ['readline.c'],
+ self.addext(Extension('readline', ['readline.c'],
library_dirs=['/usr/lib/termcap'],
libraries=readline_libs))
else:
- self.missing.append('readline')
+ self.addext(Extension('readline', ['readline.c']))
# Curses support, requiring the System V version of curses, often
# provided by the ncurses library.
@@ -1145,7 +1145,7 @@ class PyBuildExt(build_ext):
curses_enabled = True
if curses_library.startswith('ncurses'):
curses_libs = [curses_library]
- self.add(Extension('_curses', ['_cursesmodule.c'],
+ self.addext(Extension('_curses', ['_cursesmodule.c'],
include_dirs=curses_includes,
define_macros=curses_defines,
libraries=curses_libs))
@@ -1159,24 +1159,24 @@ class PyBuildExt(build_ext):
else:
curses_libs = ['curses']
- self.add(Extension('_curses', ['_cursesmodule.c'],
+ self.addext(Extension('_curses', ['_cursesmodule.c'],
define_macros=curses_defines,
libraries=curses_libs))
else:
curses_enabled = False
- self.missing.append('_curses')
+ self.addext(Extension('_curses', ['_cursesmodule.c']))
# If the curses module is enabled, check for the panel module
# _curses_panel needs some form of ncurses
skip_curses_panel = True if AIX else False
if (curses_enabled and not skip_curses_panel and
self.compiler.find_library_file(self.lib_dirs, panel_library)):
- self.add(Extension('_curses_panel', ['_curses_panel.c'],
+ self.addext(Extension('_curses_panel', ['_curses_panel.c'],
include_dirs=curses_includes,
define_macros=curses_defines,
libraries=[panel_library, *curses_libs]))
elif not skip_curses_panel:
- self.missing.append('_curses_panel')
+ self.addext(Extension('_curses_panel', ['_curses_panel.c']))
def detect_crypt(self):
self.addext(Extension('_crypt', ['_cryptmodule.c']))
@@ -1249,9 +1249,9 @@ class PyBuildExt(build_ext):
)
break
if dbmext is not None:
- self.add(dbmext)
+ self.addext(dbmext)
else:
- self.missing.append('_dbm')
+ self.addext(Extension('_dbm', ['_dbmmodule.c']))
# Anthony Baxter's gdbm module. GNU dbm(3) will require -lgdbm:
self.addext(Extension('_gdbm', ['_gdbmmodule.c']))