3838#
3939# <name> = <value>
4040#
41- # which defines a Make variable definition inserted into Makefile.in
41+ # which defines a Make variable definition inserted into Makefile.in.
42+ # You can also use any Make variable that is detected by configure and
43+ # defined in Makefile.pre.in, e.g. OpenSSL flags $(OPENSSL_INCLUDES).
4244#
4345# The build process works like this:
4446#
6567# platform should be listed below. The distribution comes with all
6668# modules enabled that are supported by most platforms and don't
6769# require you to download sources from elsewhere.
70+ #
71+ # NOTE: Avoid editing this file directly. Local changes should go into
72+ # Modules/Setup.local file. To enable all modules for testing, run
73+ #
74+ # sed -n -E 's/^#([a-z_\*].*)$/\1/p' Modules/Setup > Modules/Setup.local
6875
6976
7077# Some special rules to define PYTHONPATH.
@@ -103,12 +110,12 @@ _abc _abc.c
103110_codecs _codecsmodule.c
104111_functools _functoolsmodule.c
105112_io -I$(srcdir)/Modules/_io _io/_iomodule.c _io/iobase.c _io/fileio.c _io/bytesio.c _io/bufferedio.c _io/textio.c _io/stringio.c
106- _locale _localemodule.c # -lintl
113+ _locale _localemodule.c
107114_operator _operator.c
108115_signal signalmodule.c
109116_sre _sre.c
110117_stat _stat.c
111- _symtable symtablemodule.c # setup.py can't track the .h file that _symtable depends on.
118+ _symtable symtablemodule.c
112119_thread _threadmodule.c
113120_tracemalloc _tracemalloc.c # See bpo-35053 as to why this is built in.
114121_weakref _weakref.c
@@ -129,47 +136,30 @@ time timemodule.c
129136# Python binary, or need to specify some odd set of compiler switches,
130137# you can uncomment the appropriate lines below.
131138
132- # To enable all modules for testing, run
133- # sed -n -E 's/^#([a-z_\*].*)$/\1/p' Modules/Setup > Modules/Setup.local
134-
135139# Uncommenting the following line tells makesetup that all following
136140# modules are to be built as shared libraries (see above for more
137141# detail; also note that *static* or *disabled* cancels this effect):
138142
139143# *shared*
140144
141- # Modules that should always be present (non UNIX dependent ):
145+ # Modules that should always be present (POSIX and Windows ):
142146
143147# _asyncio _asynciomodule.c
144148# _bisect _bisectmodule.c
145- # _blake2 _blake2/blake2module.c _blake2/blake2b_impl.c _blake2/blake2s_impl.c
146- # _codecs_cn cjkcodecs/_codecs_cn.c
147- # _codecs_hk cjkcodecs/_codecs_hk.c
148- # _codecs_iso2022 cjkcodecs/_codecs_iso2022.c
149- # _codecs_jp cjkcodecs/_codecs_jp.c
150- # _codecs_kr cjkcodecs/_codecs_kr.c
151- # _codecs_tw cjkcodecs/_codecs_tw.c
152149# _contextvars _contextvarsmodule.c
153150# _csv _csv.c
154151# _datetime _datetimemodule.c
155152# UNIVERSAL: let mpdecimal.h detect settings
156153# _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
157- # _elementtree -I$(srcdir)/Modules/expat _elementtree.c
158154# _heapq _heapqmodule.c
159155# _json _json.c
160156# _lsprof _lsprof.c rotatingtree.c
161- # _md5 md5module.c
162- # _multibytecodec cjkcodecs/multibytecodec.c
163157# _multiprocessing -I$(srcdir)/Modules/_multiprocessing _multiprocessing/multiprocessing.c _multiprocessing/semaphore.c
164158# _opcode _opcode.c
165159# _pickle _pickle.c
166- # _posixsubprocess _posixsubprocess.c
167160# _queue _queuemodule.c
168161# _random _randommodule.c
169- # _sha1 sha1module.c
170- # _sha256 sha256module.c
171- # _sha512 sha512module.c
172- # _sha3 _sha3/sha3module.c
162+ # _socket socketmodule.c
173163# _statistics _statisticsmodule.c
174164# _struct _struct.c
175165# _typing _typingmodule.c
@@ -179,53 +169,65 @@ time timemodule.c
179169# binascii binascii.c
180170# cmath cmathmodule.c
181171# math mathmodule.c
172+ # mmap mmapmodule.c
173+ # select selectmodule.c
174+
175+ # XML
176+ # _elementtree -I$(srcdir)/Modules/expat _elementtree.c
182177# pyexpat -I$(srcdir)/Modules/expat expat/xmlparse.c expat/xmlrole.c expat/xmltok.c pyexpat.c
183- # unicodedata unicodedata.c
184178
185- # Modules with some UNIX dependencies -- on by default:
186- # (If you have a really backward UNIX, select and socket may not be
187- # supported...)
179+ # hashing builtins
180+ # _blake2 _blake2/blake2module.c _blake2/blake2b_impl.c _blake2/blake2s_impl.c
181+ # _md5 md5module.c
182+ # _sha1 sha1module.c
183+ # _sha256 sha256module.c
184+ # _sha512 sha512module.c
185+ # _sha3 _sha3/sha3module.c
188186
187+ # text encodings and unicode
188+ # _codecs_cn cjkcodecs/_codecs_cn.c
189+ # _codecs_hk cjkcodecs/_codecs_hk.c
190+ # _codecs_iso2022 cjkcodecs/_codecs_iso2022.c
191+ # _codecs_jp cjkcodecs/_codecs_jp.c
192+ # _codecs_kr cjkcodecs/_codecs_kr.c
193+ # _codecs_tw cjkcodecs/_codecs_tw.c
194+ # _multibytecodec cjkcodecs/multibytecodec.c
195+ # unicodedata unicodedata.c
196+
197+ # Modules with some UNIX dependencies
198+
199+ # _posixsubprocess _posixsubprocess.c
189200# _posixshmem -I$(srcdir)/Modules/_multiprocessing _multiprocessing/posixshmem.c -lrt
190- # _socket socketmodule.c # socket(2)
191- # fcntl fcntlmodule.c # fcntl(2) and ioctl(2)
192- # grp grpmodule.c # grp(3)
193- # mmap mmapmodule.c # Also works on win32.
201+ # fcntl fcntlmodule.c
202+ # grp grpmodule.c
194203# ossaudiodev ossaudiodev.c
195- # select selectmodule.c # select(2); not on ancient System V
196- # spwd spwdmodule.c # spwd(3)
204+ # resource resource.c
205+ # spwd spwdmodule.c
197206# syslog syslogmodule.c
207+ # termios termios.c
198208
199- # Some more UNIX dependent modules -- off by default, since these
200- # are not supported by all UNIX systems:
209+ # Modules with UNIX dependencies that require external libraries
201210
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
204- # termios termios.c # Steen Lumholt's termios module
205- # resource resource.c # Jeremy Hylton's rlimit interface
211+ # _crypt _cryptmodule.c -lcrypt
212+ # nis nismodule.c -I/usr/include/tirpc -lnsl -ltirpc
206213
207214# Modules that require external libraries.
208215
209216# _bz2 _bz2module.c -lbz2
210217# _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)
218+ # The _dbm module supports NDBM, GDBM with compat module, and Berkeley DB.
219+ # _dbm _dbmmodule.c -lgdbm_compat -DHAVE_NDBM_H
212220# _gdbm _gdbmmodule.c -lgdbm
213221# _lzma _lzmamodule.c -llzma
214222# _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
215223# _uuid _uuidmodule.c -luuid
216224# zlib zlibmodule.c -lz
217225
218- # GNU readline. Unlike previous Python incarnations, GNU readline is
219- # now incorporated in an optional module, configured in the Setup file
220- # instead of by a configure script switch. You may have to insert a
221- # -L option pointing to the directory where libreadline.* lives,
222- # and you may have to change -ltermcap to -ltermlib or perhaps remove
223- # it, depending on your system -- see the GNU readline instructions.
224- # It's okay for this to be a shared library, too.
225-
226+ # The readline module also supports libeditline (-leditline).
227+ # Some systems may require -ltermcap or -ltermlib.
226228# readline readline.c -lreadline -ltermcap
227229
228- # To dynamically link OpenSSL:
230+ # OpenSSL bindings
229231# _ssl _ssl.c $(OPENSSL_INCLUDES) $(OPENSSL_LDFLAGS) $(OPENSSL_LIBS)
230232# _hashlib _hashopenssl.c $(OPENSSL_INCLUDES) $(OPENSSL_LDFLAGS) -lcrypto
231233
@@ -277,13 +279,8 @@ time timemodule.c
277279# *** Always uncomment this; X11 libraries to link with:
278280# -lX11
279281
280- # Curses support, requiring the System V version of curses, often
281- # provided by the ncurses library. e.g. on Linux, link with -lncurses
282- # instead of -lcurses).
283-
284- # _curses -lcurses -lcursesw -ltermcap _cursesmodule.c
285-
286- # Wrapper for the panel library that's part of ncurses and SYSV curses.
282+ # Some system have -lcurses
283+ # _curses -lncurses -lncursesw -ltermcap _cursesmodule.c
287284# _curses_panel -lpanel -lncurses _curses_panel.c
288285
289286# macOS specific modules
0 commit comments