bpo-45548: Add missing extensions to Modules/Setup (GH-29199) · python/cpython@ece916e
@@ -129,6 +129,9 @@ time timemodule.c
129129# Python binary, or need to specify some odd set of compiler switches,
130130# you can uncomment the appropriate lines below.
131131132+# To enable all modules for testing, run
133+# sed -n -E 's/^#([a-z_\*].*)$/\1/p' Modules/Setup > Modules/Setup.local
134+132135# Uncommenting the following line tells makesetup that all following
133136# modules are to be built as shared libraries (see above for more
134137# detail; also note that *static* or *disabled* cancels this effect):
@@ -149,12 +152,15 @@ time timemodule.c
149152#_contextvars _contextvarsmodule.c
150153#_csv _csv.c
151154#_datetime _datetimemodule.c
155+# UNIVERSAL: let mpdecimal.h detect settings
156+#_decimal -DUNIVERSAL -I$(srcdir)/Modules/_decimal/libmpdec _decimal/_decimal.c _decimal/libmpdec/basearith.c _decimal/libmpdec/constants.c _decimal/libmpdec/context.c _decimal/libmpdec/convolute.c _decimal/libmpdec/crt.c _decimal/libmpdec/difradix2.c _decimal/libmpdec/fnt.c _decimal/libmpdec/fourstep.c _decimal/libmpdec/io.c _decimal/libmpdec/mpalloc.c _decimal/libmpdec/mpdecimal.c _decimal/libmpdec/numbertheory.c _decimal/libmpdec/sixstep.c _decimal/libmpdec/transpose.c
152157#_elementtree -I$(srcdir)/Modules/expat _elementtree.c
153158#_heapq _heapqmodule.c
154159#_json _json.c
155160#_lsprof _lsprof.c rotatingtree.c
156161#_md5 md5module.c
157162#_multibytecodec cjkcodecs/multibytecodec.c
163+#_multiprocessing -I$(srcdir)/Modules/_multiprocessing _multiprocessing/multiprocessing.c _multiprocessing/semaphore.c
158164#_opcode _opcode.c
159165#_pickle _pickle.c
160166#_posixsubprocess _posixsubprocess.c
@@ -171,15 +177,16 @@ time timemodule.c
171177#array arraymodule.c
172178#audioop audioop.c
173179#binascii binascii.c
174-#cmath cmathmodule.c # -lm
175-#math mathmodule.c # -lm
180+#cmath cmathmodule.c
181+#math mathmodule.c
176182#pyexpat -I$(srcdir)/Modules/expat expat/xmlparse.c expat/xmlrole.c expat/xmltok.c pyexpat.c
177183#unicodedata unicodedata.c
178184179185# Modules with some UNIX dependencies -- on by default:
180186# (If you have a really backward UNIX, select and socket may not be
181187# supported...)
182188189+#_posixshmem -I$(srcdir)/Modules/_multiprocessing _multiprocessing/posixshmem.c -lrt
183190#_socket socketmodule.c # socket(2)
184191#fcntl fcntlmodule.c # fcntl(2) and ioctl(2)
185192#grp grpmodule.c # grp(3)
@@ -192,18 +199,21 @@ time timemodule.c
192199# Some more UNIX dependent modules -- off by default, since these
193200# are not supported by all UNIX systems:
194201195-#_crypt _cryptmodule.c # -lcrypt # crypt(3); breaks many builds.
196-#nis nismodule.c -lnsl # Sun yellow pages -- not everywhere
202+#_crypt _cryptmodule.c -lcrypt # crypt(3); breaks many builds.
203+#nis nismodule.c -I/usr/include/tirpc -lnsl -ltirpc # Sun yellow pages -- not everywhere
197204#termios termios.c # Steen Lumholt's termios module
198205#resource resource.c # Jeremy Hylton's rlimit interface
199206200207# Modules that require external libraries.
201208202209#_bz2 _bz2module.c -lbz2
203-#_dbm _dbmmodule.c # -lndbm # dbm(3)
204-#_gdbm -I/usr/local/include -L/usr/local/lib -lgdbm _gdbmmodule.c
210+#_ctypes _ctypes/_ctypes.c _ctypes/callbacks.c _ctypes/callproc.c _ctypes/stgdict.c _ctypes/cfield.c -ldl -lffi -DHAVE_FFI_PREP_CIF_VAR -DHAVE_FFI_PREP_CLOSURE_LOC -DHAVE_FFI_CLOSURE_ALLOC
211+# _dbm _dbmmodule.c # -lndbm # dbm(3)
212+#_gdbm _gdbmmodule.c -lgdbm
205213#_lzma _lzmamodule.c -llzma
206-#zlib -I$(prefix)/include -L$(exec_prefix)/lib -lz zlibmodule.c
214+#_sqlite3 _sqlite/connection.c _sqlite/cursor.c _sqlite/microprotocols.c _sqlite/module.c _sqlite/prepare_protocol.c _sqlite/row.c _sqlite/statement.c _sqlite/util.c -lsqlite3
215+#_uuid _uuidmodule.c -luuid
216+#zlib zlibmodule.c -lz
207217208218# GNU readline. Unlike previous Python incarnations, GNU readline is
209219# now incorporated in an optional module, configured in the Setup file
@@ -215,29 +225,16 @@ time timemodule.c
215225216226#readline readline.c -lreadline -ltermcap
217227218-# Set OpenSSL when not using the system copy found by ./configure.
219-#OPENSSL=/path/to/openssl/directory
220-221228# To dynamically link OpenSSL:
222-#_ssl _ssl.c \
223-# -I$(OPENSSL)/include -L$(OPENSSL)/lib \
224-# -lssl -lcrypto \
225-# -DPy_BUILD_CORE_BUILTIN
226-#_hashlib _hashopenssl.c \
227-# -I$(OPENSSL)/include -L$(OPENSSL)/lib \
228-# -lcrypto \
229-# -DPy_BUILD_CORE_BUILTIN
229+#_ssl _ssl.c $(OPENSSL_INCLUDES) $(OPENSSL_LDFLAGS) $(OPENSSL_LIBS)
230+#_hashlib _hashopenssl.c $(OPENSSL_INCLUDES) $(OPENSSL_LDFLAGS) -lcrypto
230231231232# To statically link OpenSSL:
232-#_ssl _ssl.c \
233-# -I$(OPENSSL)/include -L$(OPENSSL)/lib \
233+# _ssl _ssl.c $(OPENSSL_INCLUDES) $(OPENSSL_LDFLAGS) \
234234# -l:libssl.a -Wl,--exclude-libs,libssl.a \
235-# -l:libcrypto.a -Wl,--exclude-libs,libcrypto.a \
236-# -DPy_BUILD_CORE_BUILTIN
237-#_hashlib _hashopenssl.c \
238-# -I$(OPENSSL)/include -L$(OPENSSL)/lib \
239-# -l:libcrypto.a -Wl,--exclude-libs,libcrypto.a \
240-# -DPy_BUILD_CORE_BUILTIN
235+# -l:libcrypto.a -Wl,--exclude-libs,libcrypto.a
236+# _hashlib _hashopenssl.c $(OPENSSL_INCLUDES) $(OPENSSL_LDFLAGS) \
237+# -l:libcrypto.a -Wl,--exclude-libs,libcrypto.a
241238242239# The _tkinter module.
243240#
@@ -251,7 +248,7 @@ time timemodule.c
251248# every system.
252249253250# *** Always uncomment this (leave the leading underscore in!):
254-# _tkinter _tkinter.c tkappinit.c -DWITH_APPINIT \
251+#_tkinter _tkinter.c tkappinit.c -DWITH_APPINIT $(TCLTK_INCLUDES) $(TCLTK_LIBS) \
255252# *** Uncomment and edit to reflect where your Tcl/Tk libraries are:
256253# -L/usr/local/lib \
257254# *** Uncomment and edit to reflect where your Tcl/Tk headers are:
@@ -269,8 +266,6 @@ time timemodule.c
269266# -DWITH_PIL -I../Extensions/Imaging/libImaging tkImaging.c \
270267# *** Uncomment and edit for TOGL extension only:
271268# -DWITH_TOGL togl.c \
272-# *** Uncomment and edit to reflect your Tcl/Tk versions:
273-# -ltk8.2 -ltcl8.2 \
274269# *** Uncomment and edit to reflect where your X11 libraries are:
275270# -L/usr/X11R6/lib \
276271# *** Or uncomment this for Solaris:
@@ -286,11 +281,14 @@ time timemodule.c
286281# provided by the ncurses library. e.g. on Linux, link with -lncurses
287282# instead of -lcurses).
288283289-#_curses -lcurses -ltermcap _cursesmodule.c
284+#_curses -lcurses -lcursesw -ltermcap _cursesmodule.c
290285291286# Wrapper for the panel library that's part of ncurses and SYSV curses.
292287#_curses_panel -lpanel -lncurses _curses_panel.c
293288289+# macOS specific modules
290+# _scproxy _scproxy.c -framework SystemConfiguration -framework CoreFoundation
291+294292# Examples
295293296294#xx xxmodule.c
@@ -302,18 +300,20 @@ xxsubtype xxsubtype.c # Required for the test suite to pass!
302300303301#_xxsubinterpreters _xxsubinterpretersmodule.c
304302#_xxtestfuzz _xxtestfuzz/_xxtestfuzz.c _xxtestfuzz/fuzzer.c
303+#_ctypes_test _ctypes/_ctypes_test.c
305304#_testbuffer _testbuffer.c
306-#_testcapi _testcapimodule.c # CANNOT be statically compiled!
307305#_testimportmultiple _testimportmultiple.c
308306#_testinternalcapi _testinternalcapi.c
309307#_testmultiphase _testmultiphase.c
310308309+#*shared*
310+#_testcapi _testcapimodule.c # CANNOT be statically compiled!
311311312312# ---
313313# Uncommenting the following line tells makesetup that all following modules
314314# are not built (see above for more detail).
315315#
316316#*disabled*
317317#
318-#_sqlite3 _tkinter _curses pyexpat
319-#_codecs_jp _codecs_kr _codecs_tw unicodedata
318+# _sqlite3 _tkinter _curses pyexpat
319+# _codecs_jp _codecs_kr _codecs_tw unicodedata