| 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 |
|
| 113 |
# --- |
| 114 |
# Built-in modules required to get a functioning interpreter are listed in |
| 115 |
# Modules/Setup.bootstrap. |
| 116 |
|
| 117 |
# --- |
| 118 |
# The rest of the modules listed in this file are all commented out by |
| 119 |
# default. Usually they can be detected and built as dynamically |
| 120 |
# loaded modules by setup.py. If you're on a platform that doesn't |
| 121 |
# support dynamic loading, want to compile modules statically into the |
| 122 |
# Python binary, or need to specify some odd set of compiler switches, |
| 123 |
# you can uncomment the appropriate lines below. |
| 124 |
|
| 125 |
# Uncommenting the following line tells makesetup that all following |
| 126 |
# modules are to be built as shared libraries (see above for more |
| 127 |
# detail; also note that *static* or *disabled* cancels this effect): |
| 128 |
|
| 129 |
#*shared* |
| 130 |
|
| 131 |
# Modules that should always be present (POSIX and Windows): |
| 132 |
|
| 133 |
#_asyncio _asynciomodule.c |
| 134 |
#_bisect _bisectmodule.c |
| 135 |
#_csv _csv.c |
| 136 |
#_datetime _datetimemodule.c |
| 137 |
#_decimal _decimal/_decimal.c |
| 138 |
#_heapq _heapqmodule.c |
| 139 |
#_interpchannels _interpchannelsmodule.c |
| 140 |
#_interpqueues _interpqueuesmodule.c |
| 141 |
#_interpreters _interpretersmodule.c |
| 142 |
#_json _json.c |
| 143 |
#_lsprof _lsprof.c rotatingtree.c |
| 144 |
#_multiprocessing -I$(srcdir)/Modules/_multiprocessing _multiprocessing/multiprocessing.c _multiprocessing/semaphore.c |
| 145 |
#_opcode _opcode.c |
| 146 |
#_pickle _pickle.c |
| 147 |
#_queue _queuemodule.c |
| 148 |
#_random _randommodule.c |
| 149 |
#_socket socketmodule.c |
| 150 |
#_statistics _statisticsmodule.c |
| 151 |
#_struct _struct.c |
| 152 |
#_types _typesmodule.c |
| 153 |
#_typing _typingmodule.c |
| 154 |
#_zoneinfo _zoneinfo.c |
| 155 |
#array arraymodule.c |
| 156 |
#binascii binascii.c |
| 157 |
#cmath cmathmodule.c |
| 158 |
#math mathmodule.c |
| 159 |
#mmap mmapmodule.c |
| 160 |
#select selectmodule.c |
| 161 |
#_sysconfig _sysconfig.c |
| 162 |
|
| 163 |
# XML |
| 164 |
#_elementtree _elementtree.c |
| 165 |
#pyexpat pyexpat.c |
| 166 |
|
| 167 |
# hashing builtins |
| 168 |
#_blake2 blake2module.c |
| 169 |
#_md5 md5module.c |
| 170 |
#_sha1 sha1module.c |
| 171 |
#_sha2 sha2module.c |
| 172 |
#_sha3 sha3module.c |
| 173 |
#_hmac hmacmodule.c |
| 174 |
|
| 175 |
# text encodings and unicode |
| 176 |
#_codecs_cn cjkcodecs/_codecs_cn.c |
| 177 |
#_codecs_hk cjkcodecs/_codecs_hk.c |
| 178 |
#_codecs_iso2022 cjkcodecs/_codecs_iso2022.c |
| 179 |
#_codecs_jp cjkcodecs/_codecs_jp.c |
| 180 |
#_codecs_kr cjkcodecs/_codecs_kr.c |
| 181 |
#_codecs_tw cjkcodecs/_codecs_tw.c |
| 182 |
#_multibytecodec cjkcodecs/multibytecodec.c |
| 183 |
#unicodedata unicodedata.c |
| 184 |
|
| 185 |
# Modules with some UNIX dependencies |
| 186 |
|
| 187 |
#_posixsubprocess _posixsubprocess.c |
| 188 |
#_posixshmem -I$(srcdir)/Modules/_multiprocessing _multiprocessing/posixshmem.c -lrt |
| 189 |
#fcntl fcntlmodule.c |
| 190 |
#grp grpmodule.c |
| 191 |
#resource resource.c |
| 192 |
#syslog syslogmodule.c |
| 193 |
#termios termios.c |
| 194 |
|
| 195 |
# Modules that require external libraries. |
| 196 |
|
| 197 |
#_bz2 _bz2module.c -lbz2 |
| 198 |
#_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 |
| 199 |
# The _dbm module supports NDBM, GDBM with compat module, and Berkeley DB. |
| 200 |
#_dbm _dbmmodule.c -lgdbm_compat -DUSE_GDBM_COMPAT |
| 201 |
#_gdbm _gdbmmodule.c -lgdbm |
| 202 |
#_lzma _lzmamodule.c -llzma |
| 203 |
#_uuid _uuidmodule.c -luuid |
| 204 |
#_zstd _zstd/_zstdmodule.c -lzstd -I$(srcdir)/Modules/_zstd |
| 205 |
#zlib zlibmodule.c -lz |
| 206 |
|
| 207 |
# The readline module also supports libeditline (-leditline). |
| 208 |
# Some systems may require -ltermcap or -ltermlib. |
| 209 |
#readline readline.c -lreadline -ltermcap |
| 210 |
|
| 211 |
# OpenSSL bindings |
| 212 |
#_ssl _ssl.c $(OPENSSL_INCLUDES) $(OPENSSL_LDFLAGS) $(OPENSSL_LIBS) |
| 213 |
#_hashlib _hashopenssl.c $(OPENSSL_INCLUDES) $(OPENSSL_LDFLAGS) -lcrypto |
| 214 |
|
| 215 |
# To statically link OpenSSL: |
| 216 |
# _ssl _ssl.c $(OPENSSL_INCLUDES) $(OPENSSL_LDFLAGS) \ |
| 217 |
# -l:libssl.a -Wl,--exclude-libs,libssl.a \ |
| 218 |
# -l:libcrypto.a -Wl,--exclude-libs,libcrypto.a |
| 219 |
# _hashlib _hashopenssl.c $(OPENSSL_INCLUDES) $(OPENSSL_LDFLAGS) \ |
| 220 |
# -l:libcrypto.a -Wl,--exclude-libs,libcrypto.a |
| 221 |
|
| 222 |
# The _tkinter module. |
| 223 |
# |
| 224 |
# The command for _tkinter is long and site specific. Please |
| 225 |
# uncomment and/or edit those parts as indicated. If you don't have a |
| 226 |
# specific extension (e.g. Tix or BLT), leave the corresponding line |
| 227 |
# commented out. (Leave the trailing backslashes in! If you |
| 228 |
# experience strange errors, you may want to join all uncommented |
| 229 |
# lines and remove the backslashes -- the backslash interpretation is |
| 230 |
# done by the shell's "read" command and it may not be implemented on |
| 231 |
# every system. |
| 232 |
|
| 233 |
# *** Always uncomment this (leave the leading underscore in!): |
| 234 |
#_tkinter _tkinter.c tkappinit.c -DWITH_APPINIT $(TCLTK_INCLUDES) $(TCLTK_LIBS) \ |
| 235 |
# *** Uncomment and edit to reflect where your Tcl/Tk libraries are: |
| 236 |
# -L/usr/local/lib \ |
| 237 |
# *** Uncomment and edit to reflect where your Tcl/Tk headers are: |
| 238 |
# -I/usr/local/include \ |
| 239 |
# *** Uncomment and edit to reflect where your X11 header files are: |
| 240 |
# -I/usr/X11R6/include \ |
| 241 |
# *** Or uncomment this for Solaris: |
| 242 |
# -I/usr/openwin/include \ |
| 243 |
# *** Uncomment and edit for Tix extension only: |
| 244 |
# -DWITH_TIX -ltix8.1.8.2 \ |
| 245 |
# *** Uncomment and edit for BLT extension only: |
| 246 |
# -DWITH_BLT -I/usr/local/blt/blt8.0-unoff/include -lBLT8.0 \ |
| 247 |
# *** Uncomment and edit for PIL (TkImaging) extension only: |
| 248 |
# (See http://www.pythonware.com/products/pil/ for more info) |
| 249 |
# -DWITH_PIL -I../Extensions/Imaging/libImaging tkImaging.c \ |
| 250 |
# *** Uncomment and edit for TOGL extension only: |
| 251 |
# -DWITH_TOGL togl.c \ |
| 252 |
# *** Uncomment and edit to reflect where your X11 libraries are: |
| 253 |
# -L/usr/X11R6/lib \ |
| 254 |
# *** Or uncomment this for Solaris: |
| 255 |
# -L/usr/openwin/lib \ |
| 256 |
# *** Uncomment these for TOGL extension only: |
| 257 |
# -lGL -lGLU -lXext -lXmu \ |
| 258 |
# *** Uncomment for AIX: |
| 259 |
# -lld \ |
| 260 |
# *** Always uncomment this; X11 libraries to link with: |
| 261 |
# -lX11 |
| 262 |
|
| 263 |
# Some system have -lcurses |
| 264 |
#_curses -lncurses -lncursesw -ltermcap _cursesmodule.c |
| 265 |
#_curses_panel -lpanel -lncurses _curses_panel.c |
| 266 |
|
| 267 |
# macOS specific module, needs SystemConfiguration and CoreFoundation framework |
| 268 |
# _scproxy _scproxy.c |
| 269 |
|
| 270 |
# Examples |
| 271 |
|
| 272 |
#xx xxmodule.c |
| 273 |
#xxlimited xxlimited.c |
| 274 |
#xxlimited_35 xxlimited_35.c |
| 275 |
#xxsubtype xxsubtype.c |
| 276 |
|
| 277 |
# Testing |
| 278 |
|
| 279 |
#_xxtestfuzz _xxtestfuzz/_xxtestfuzz.c _xxtestfuzz/fuzzer.c |
| 280 |
#_testbuffer _testbuffer.c |
| 281 |
#_testinternalcapi _testinternalcapi.c |
| 282 |
|
| 283 |
# Some testing modules MUST be built as shared libraries. |
| 284 |
|
| 285 |
#*shared* |
| 286 |
#_ctypes_test _ctypes/_ctypes_test.c |
| 287 |
#_remote_debugging _remote_debugging_module.c |
| 288 |
#_testcapi _testcapimodule.c |
| 289 |
#_testimportmultiple _testimportmultiple.c |
| 290 |
#_testmultiphase _testmultiphase.c |
| 291 |
#_testsinglephase _testsinglephase.c |
| 292 |
|
| 293 |
# --- |
| 294 |
# Uncommenting the following line tells makesetup that all following modules |
| 295 |
# are not built (see above for more detail). |
| 296 |
# |
| 297 |
#*disabled* |
| 298 |
# |
| 299 |
# _sqlite3 _tkinter _curses pyexpat |
| 300 |
# _codecs_jp _codecs_kr _codecs_tw unicodedata |