Debian Codegraph @

Modules/Setup

raw ◀ ▶
1 Debian patch touch this file
1 # -*- makefile -*-
2 # The file Setup is used by the makesetup script to construct the files
3 # Makefile and config.c, from Makefile.pre and config.c.in,
4 # respectively. Note that Makefile.pre is created from Makefile.pre.in
5 # by the toplevel configure script.
6
7 # (VPATH notes: Setup and Makefile.pre are in the build directory, as
8 # are Makefile and config.c; the *.in files are in the source directory.)
9
10 # Each line in this file describes one or more optional modules.
11 # Modules configured here will not be compiled by the setup.py script,
12 # so the file can be used to override setup.py's behavior.
13 # Tag lines containing just the word "*static*", "*shared*" or "*disabled*"
14 # (without the quotes but with the stars) are used to tag the following module
15 # descriptions. Tag lines may alternate throughout this file. Modules are
16 # built statically when they are preceded by a "*static*" tag line or when
17 # there is no tag line between the start of the file and the module
18 # description. Modules are built as a shared library when they are preceded by
19 # a "*shared*" tag line. Modules are not built at all, not by the Makefile,
20 # nor by the setup.py script, when they are preceded by a "*disabled*" tag
21 # line.
22
23 # Lines have the following structure:
24 #
25 # <module> ... [<sourcefile> ...] [<cpparg> ...] [<library> ...]
26 #
27 # <sourcefile> is anything ending in .c (.C, .cc, .c++ are C++ files)
28 # <cpparg> is anything starting with -I, -D, -U or -C
29 # <library> is anything ending in .a or beginning with -l or -L
30 # <module> is anything else but should be a valid Python
31 # identifier (letters, digits, underscores, beginning with non-digit)
32 #
33 # (As the makesetup script changes, it may recognize some other
34 # arguments as well, e.g. *.so and *.sl as libraries. See the big
35 # case statement in the makesetup script.)
36 #
37 # Lines can also have the form
38 #
39 # <name> = <value>
40 #
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).
44 #
45 # Rules generated by makesetup use additional variables:
46 #
47 # - All source file rules have a dependency on $(PYTHON_HEADERS) and on
48 # optional variable $(MODULES_{mod_upper}_DEPS).
49 # - If no <cpparg> and no <library> arguments are given, then makesetup
50 # defaults to $(MODULES_{mod_upper}_CFLAGS) cppargs and
51 # $(MODULES_{mod_upper}_LDFLAGS) libraries. The variables are typically
52 # defined by configure.
53 #
54 # The build process works like this:
55 #
56 # 1. Build all modules that are declared as static in Modules/Setup,
57 # combine them into libpythonxy.a, combine that into python.
58 # 2. Build all modules that are listed as shared in Modules/Setup.
59 # 3. Invoke setup.py. That builds all modules that
60 # a) are not builtin, and
61 # b) are not listed in Modules/Setup, and
62 # c) can be build on the target
63 #
64 # Therefore, modules declared to be shared will not be
65 # included in the config.c file, nor in the list of objects to be
66 # added to the library archive, and their linker options won't be
67 # added to the linker options. Rules to create their .o files and
68 # their shared libraries will still be added to the Makefile, and
69 # their names will be collected in the Make variable SHAREDMODS. This
70 # is used to build modules as shared libraries. (They can be
71 # installed using "make sharedinstall", which is implied by the
72 # toplevel "make install" target.) (For compatibility,
73 # *noconfig* has the same effect as *shared*.)
74 #
75 # NOTE: As a standard policy, as many modules as can be supported by a
76 # platform should be listed below. The distribution comes with all
77 # modules enabled that are supported by most platforms and don't
78 # require you to download sources from elsewhere.
79 #
80 # NOTE: Avoid editing this file directly. Local changes should go into
81 # Modules/Setup.local file. To enable all modules for testing, run
82 #
83 # sed -n -E 's/^#([a-z_\*].*)$/\1/p' Modules/Setup > Modules/Setup.local
84
85
86 # Some special rules to define PYTHONPATH.
87 # Edit the definitions below to indicate which options you are using.
88 # Don't add any whitespace or comments!
89
90 # Directories where library files get installed.
91 # DESTLIB is for Python modules; MACHDESTLIB for shared libraries.
92 DESTLIB=$(LIBDEST)
93 MACHDESTLIB=$(BINLIBDEST)
94
95 # NOTE: all the paths are now relative to the prefix that is computed
96 # at run time!
97
98 # Standard path -- don't edit.
99 # No leading colon since this is the first entry.
100 # Empty since this is now just the runtime prefix.
101 DESTPATH=
102
103 # Site specific path components -- should begin with : if non-empty
104 SITEPATH=
105
106 # Standard path components for test modules
107 TESTPATH=
108
109 COREPYTHONPATH=$(DESTPATH)$(SITEPATH)$(TESTPATH)
110 PYTHONPATH=$(COREPYTHONPATH)
111
•112 #_hashlib _hashopenssl.c -lssl -lcrypto
113
114 # ---
115 # Built-in modules required to get a functioning interpreter are listed in
116 # Modules/Setup.bootstrap.
117
118 # ---
119 # The rest of the modules listed in this file are all commented out by
120 # default. Usually they can be detected and built as dynamically
121 # loaded modules by setup.py. If you're on a platform that doesn't
122 # support dynamic loading, want to compile modules statically into the
123 # Python binary, or need to specify some odd set of compiler switches,
124 # you can uncomment the appropriate lines below.
125
126 # Uncommenting the following line tells makesetup that all following
127 # modules are to be built as shared libraries (see above for more
128 # detail; also note that *static* or *disabled* cancels this effect):
129
130 #*shared*
131
132 # Modules that should always be present (POSIX and Windows):
133
134 #_asyncio _asynciomodule.c
135 #_bisect _bisectmodule.c
136 #_csv _csv.c
137 #_datetime _datetimemodule.c
138 #_decimal _decimal/_decimal.c
139 #_heapq _heapqmodule.c
140 #_interpchannels _interpchannelsmodule.c
141 #_interpqueues _interpqueuesmodule.c
142 #_interpreters _interpretersmodule.c
143 #_json _json.c
144 #_lsprof _lsprof.c rotatingtree.c
145 #_multiprocessing -I$(srcdir)/Modules/_multiprocessing _multiprocessing/multiprocessing.c _multiprocessing/semaphore.c
146 #_opcode _opcode.c
147 #_pickle _pickle.c
148 #_queue _queuemodule.c
149 #_random _randommodule.c
150 #_socket socketmodule.c
151 #_statistics _statisticsmodule.c
152 #_struct _struct.c
153 #_types _typesmodule.c
154 #_typing _typingmodule.c
155 #_zoneinfo _zoneinfo.c
156 #array arraymodule.c
157 #binascii binascii.c
158 #cmath cmathmodule.c
159 #math mathmodule.c
160 #mmap mmapmodule.c
161 #select selectmodule.c
162 #_sysconfig _sysconfig.c
163
164 # XML
•165 #_elementtree _elementtree.c -lexpat
166 #pyexpat pyexpat.c -lexpat
167
168 # hashing builtins
169 #_blake2 blake2module.c
170 #_md5 md5module.c
171 #_sha1 sha1module.c
172 #_sha2 sha2module.c
173 #_sha3 sha3module.c
174 #_hmac hmacmodule.c
175
176 # text encodings and unicode
177 #_codecs_cn cjkcodecs/_codecs_cn.c
178 #_codecs_hk cjkcodecs/_codecs_hk.c
179 #_codecs_iso2022 cjkcodecs/_codecs_iso2022.c
180 #_codecs_jp cjkcodecs/_codecs_jp.c
181 #_codecs_kr cjkcodecs/_codecs_kr.c
182 #_codecs_tw cjkcodecs/_codecs_tw.c
183 #_multibytecodec cjkcodecs/multibytecodec.c
184 #unicodedata unicodedata.c
185
186 # Modules with some UNIX dependencies
187
188 #_posixsubprocess _posixsubprocess.c
189 #_posixshmem -I$(srcdir)/Modules/_multiprocessing _multiprocessing/posixshmem.c -lrt
190 #fcntl fcntlmodule.c
191 #grp grpmodule.c
192 #resource resource.c
193 #syslog syslogmodule.c
194 #termios termios.c
195
196 # Modules that require external libraries.
197
198 #_bz2 _bz2module.c -lbz2
199 #_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
200 # The _dbm module supports NDBM, GDBM with compat module, and Berkeley DB.
201 #_dbm _dbmmodule.c -lgdbm_compat -DUSE_GDBM_COMPAT
202 #_gdbm _gdbmmodule.c -lgdbm
203 #_lzma _lzmamodule.c -llzma
204 #_uuid _uuidmodule.c -luuid
205 #_zstd _zstd/_zstdmodule.c -lzstd -I$(srcdir)/Modules/_zstd
206 #zlib zlibmodule.c -lz
207
208 # The readline module also supports libeditline (-leditline).
209 # Some systems may require -ltermcap or -ltermlib.
210 #readline readline.c -lreadline -ltermcap
211
212 # OpenSSL bindings
•213 #_ssl _ssl.c -lssl -lcrypto
214 #_hashlib _hashopenssl.c -lcrypto
215
216 # The _tkinter module.
217 #
218 # The command for _tkinter is long and site specific. Please
219 # uncomment and/or edit those parts as indicated. If you don't have a
220 # specific extension (e.g. Tix or BLT), leave the corresponding line
221 # commented out. (Leave the trailing backslashes in! If you
222 # experience strange errors, you may want to join all uncommented
223 # lines and remove the backslashes -- the backslash interpretation is
224 # done by the shell's "read" command and it may not be implemented on
225 # every system.
226
227 # *** Always uncomment this (leave the leading underscore in!):
228 #_tkinter _tkinter.c tkappinit.c -DWITH_APPINIT $(TCLTK_INCLUDES) $(TCLTK_LIBS) \
229 # *** Uncomment and edit to reflect where your Tcl/Tk libraries are:
230 # -L/usr/local/lib \
231 # *** Uncomment and edit to reflect where your Tcl/Tk headers are:
232 # -I/usr/local/include \
233 # *** Uncomment and edit to reflect where your X11 header files are:
234 # -I/usr/X11R6/include \
235 # *** Or uncomment this for Solaris:
236 # -I/usr/openwin/include \
237 # *** Uncomment and edit for Tix extension only:
238 # -DWITH_TIX -ltix8.1.8.2 \
239 # *** Uncomment and edit for BLT extension only:
240 # -DWITH_BLT -I/usr/local/blt/blt8.0-unoff/include -lBLT8.0 \
241 # *** Uncomment and edit for PIL (TkImaging) extension only:
242 # (See http://www.pythonware.com/products/pil/ for more info)
243 # -DWITH_PIL -I../Extensions/Imaging/libImaging tkImaging.c \
244 # *** Uncomment and edit for TOGL extension only:
245 # -DWITH_TOGL togl.c \
246 # *** Uncomment and edit to reflect where your X11 libraries are:
247 # -L/usr/X11R6/lib \
248 # *** Or uncomment this for Solaris:
249 # -L/usr/openwin/lib \
250 # *** Uncomment these for TOGL extension only:
251 # -lGL -lGLU -lXext -lXmu \
252 # *** Uncomment for AIX:
253 # -lld \
254 # *** Always uncomment this; X11 libraries to link with:
255 # -lX11
256
257 # Some system have -lcurses
258 #_curses -lncurses -lncursesw -ltermcap _cursesmodule.c
259 #_curses_panel -lpanel -lncurses _curses_panel.c
260
261 # macOS specific module, needs SystemConfiguration and CoreFoundation framework
262 # _scproxy _scproxy.c
263
264 # Examples
265
266 #xx xxmodule.c
267 #xxlimited xxlimited.c
268 #xxlimited_35 xxlimited_35.c
269 #xxsubtype xxsubtype.c
270
271 # Testing
272
273 #_xxtestfuzz _xxtestfuzz/_xxtestfuzz.c _xxtestfuzz/fuzzer.c
274 #_testbuffer _testbuffer.c
275 #_testinternalcapi _testinternalcapi.c
276
277 # Some testing modules MUST be built as shared libraries.
278
279 #*shared*
280 #_ctypes_test _ctypes/_ctypes_test.c
281 #_remote_debugging _remote_debugging_module.c
282 #_testcapi _testcapimodule.c
283 #_testimportmultiple _testimportmultiple.c
284 #_testmultiphase _testmultiphase.c
285 #_testsinglephase _testsinglephase.c
286
287 # ---
288 # Uncommenting the following line tells makesetup that all following modules
289 # are not built (see above for more detail).
290 #
291 #*disabled*
292 #
293 # _sqlite3 _tkinter _curses pyexpat
294 # _codecs_jp _codecs_kr _codecs_tw unicodedata