38
38
#
39
39
# <name> = <value>
40
40
#
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).
42
44
#
43
45
# The build process works like this:
44
46
#
65
67
# platform should be listed below. The distribution comes with all
66
68
# modules enabled that are supported by most platforms and don't
67
69
# 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
68
75
69
76
70
77
# Some special rules to define PYTHONPATH.
@@ -103,12 +110,12 @@ _abc _abc.c
103
110
_codecs _codecsmodule.c
104
111
_functools _functoolsmodule.c
105
112
_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
107
114
_operator _operator.c
108
115
_signal signalmodule.c
109
116
_sre _sre.c
110
117
_stat _stat.c
111
- _symtable symtablemodule.c # setup.py can't track the .h file that _symtable depends on.
118
+ _symtable symtablemodule.c
112
119
_thread _threadmodule.c
113
120
_tracemalloc _tracemalloc.c # See bpo-35053 as to why this is built in.
114
121
_weakref _weakref.c
@@ -129,47 +136,30 @@ time timemodule.c
129
136
# Python binary, or need to specify some odd set of compiler switches,
130
137
# you can uncomment the appropriate lines below.
131
138
132
- # To enable all modules for testing, run
133
- # sed -n -E 's/^#([a-z_\*].*)$/\1/p' Modules/Setup > Modules/Setup.local
134
-
135
139
# Uncommenting the following line tells makesetup that all following
136
140
# modules are to be built as shared libraries (see above for more
137
141
# detail; also note that *static* or *disabled* cancels this effect):
138
142
139
143
# *shared*
140
144
141
- # Modules that should always be present (non UNIX dependent ):
145
+ # Modules that should always be present (POSIX and Windows ):
142
146
143
147
# _asyncio _asynciomodule.c
144
148
# _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
152
149
# _contextvars _contextvarsmodule.c
153
150
# _csv _csv.c
154
151
# _datetime _datetimemodule.c
155
152
# UNIVERSAL: let mpdecimal.h detect settings
156
153
# _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
158
154
# _heapq _heapqmodule.c
159
155
# _json _json.c
160
156
# _lsprof _lsprof.c rotatingtree.c
161
- # _md5 md5module.c
162
- # _multibytecodec cjkcodecs/multibytecodec.c
163
157
# _multiprocessing -I$(srcdir)/Modules/_multiprocessing _multiprocessing/multiprocessing.c _multiprocessing/semaphore.c
164
158
# _opcode _opcode.c
165
159
# _pickle _pickle.c
166
- # _posixsubprocess _posixsubprocess.c
167
160
# _queue _queuemodule.c
168
161
# _random _randommodule.c
169
- # _sha1 sha1module.c
170
- # _sha256 sha256module.c
171
- # _sha512 sha512module.c
172
- # _sha3 _sha3/sha3module.c
162
+ # _socket socketmodule.c
173
163
# _statistics _statisticsmodule.c
174
164
# _struct _struct.c
175
165
# _typing _typingmodule.c
@@ -179,53 +169,65 @@ time timemodule.c
179
169
# binascii binascii.c
180
170
# cmath cmathmodule.c
181
171
# math mathmodule.c
172
+ # mmap mmapmodule.c
173
+ # select selectmodule.c
174
+
175
+ # XML
176
+ # _elementtree -I$(srcdir)/Modules/expat _elementtree.c
182
177
# pyexpat -I$(srcdir)/Modules/expat expat/xmlparse.c expat/xmlrole.c expat/xmltok.c pyexpat.c
183
- # unicodedata unicodedata.c
184
178
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
188
186
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
189
200
# _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
194
203
# 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
197
206
# syslog syslogmodule.c
207
+ # termios termios.c
198
208
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
201
210
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
206
213
207
214
# Modules that require external libraries.
208
215
209
216
# _bz2 _bz2module.c -lbz2
210
217
# _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
212
220
# _gdbm _gdbmmodule.c -lgdbm
213
221
# _lzma _lzmamodule.c -llzma
214
222
# _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
223
# _uuid _uuidmodule.c -luuid
216
224
# zlib zlibmodule.c -lz
217
225
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.
226
228
# readline readline.c -lreadline -ltermcap
227
229
228
- # To dynamically link OpenSSL:
230
+ # OpenSSL bindings
229
231
# _ssl _ssl.c $(OPENSSL_INCLUDES) $(OPENSSL_LDFLAGS) $(OPENSSL_LIBS)
230
232
# _hashlib _hashopenssl.c $(OPENSSL_INCLUDES) $(OPENSSL_LDFLAGS) -lcrypto
231
233
@@ -277,13 +279,8 @@ time timemodule.c
277
279
# *** Always uncomment this; X11 libraries to link with:
278
280
# -lX11
279
281
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
287
284
# _curses_panel -lpanel -lncurses _curses_panel.c
288
285
289
286
# macOS specific modules
0 commit comments