xf.li | 8611891 | 2025-03-19 20:07:27 -0700 | [diff] [blame^] | 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 | # |
| 43 | # The build process works like this: |
| 44 | # |
| 45 | # 1. Build all modules that are declared as static in Modules/Setup, |
| 46 | # combine them into libpythonxy.a, combine that into python. |
| 47 | # 2. Build all modules that are listed as shared in Modules/Setup. |
| 48 | # 3. Invoke setup.py. That builds all modules that |
| 49 | # a) are not builtin, and |
| 50 | # b) are not listed in Modules/Setup, and |
| 51 | # c) can be build on the target |
| 52 | # |
| 53 | # Therefore, modules declared to be shared will not be |
| 54 | # included in the config.c file, nor in the list of objects to be |
| 55 | # added to the library archive, and their linker options won't be |
| 56 | # added to the linker options. Rules to create their .o files and |
| 57 | # their shared libraries will still be added to the Makefile, and |
| 58 | # their names will be collected in the Make variable SHAREDMODS. This |
| 59 | # is used to build modules as shared libraries. (They can be |
| 60 | # installed using "make sharedinstall", which is implied by the |
| 61 | # toplevel "make install" target.) (For compatibility, |
| 62 | # *noconfig* has the same effect as *shared*.) |
| 63 | # |
| 64 | # NOTE: As a standard policy, as many modules as can be supported by a |
| 65 | # platform should be present. The distribution comes with all modules |
| 66 | # enabled that are supported by most platforms and don't require you |
| 67 | # to ftp sources from elsewhere. |
| 68 | |
| 69 | |
| 70 | # Some special rules to define PYTHONPATH. |
| 71 | # Edit the definitions below to indicate which options you are using. |
| 72 | # Don't add any whitespace or comments! |
| 73 | |
| 74 | # Directories where library files get installed. |
| 75 | # DESTLIB is for Python modules; MACHDESTLIB for shared libraries. |
| 76 | DESTLIB=$(LIBDEST) |
| 77 | MACHDESTLIB=$(BINLIBDEST) |
| 78 | |
| 79 | # NOTE: all the paths are now relative to the prefix that is computed |
| 80 | # at run time! |
| 81 | |
| 82 | # Standard path -- don't edit. |
| 83 | # No leading colon since this is the first entry. |
| 84 | # Empty since this is now just the runtime prefix. |
| 85 | DESTPATH= |
| 86 | |
| 87 | # Site specific path components -- should begin with : if non-empty |
| 88 | SITEPATH= |
| 89 | |
| 90 | # Standard path components for test modules |
| 91 | TESTPATH= |
| 92 | |
| 93 | COREPYTHONPATH=$(DESTPATH)$(SITEPATH)$(TESTPATH) |
| 94 | PYTHONPATH=$(COREPYTHONPATH) |
| 95 | |
| 96 | |
| 97 | # The modules listed here can't be built as shared libraries for |
| 98 | # various reasons; therefore they are listed here instead of in the |
| 99 | # normal order. |
| 100 | |
| 101 | # This only contains the minimal set of modules required to run the |
| 102 | # setup.py script in the root of the Python source tree. |
| 103 | |
| 104 | posix -DPy_BUILD_CORE_BUILTIN -I$(srcdir)/Include/internal posixmodule.c # posix (UNIX) system calls |
| 105 | errno errnomodule.c # posix (UNIX) errno values |
| 106 | pwd pwdmodule.c # this is needed to find out the user's home dir |
| 107 | # if $HOME is not set |
| 108 | _sre _sre.c # Fredrik Lundh's new regular expressions |
| 109 | _codecs _codecsmodule.c # access to the builtin codecs and codec registry |
| 110 | _weakref _weakref.c # weak references |
| 111 | _functools -DPy_BUILD_CORE_BUILTIN -I$(srcdir)/Include/internal _functoolsmodule.c # Tools for working with functions and callable objects |
| 112 | _operator _operator.c # operator.add() and similar goodies |
| 113 | _collections _collectionsmodule.c # Container types |
| 114 | _abc _abc.c # Abstract base classes |
| 115 | itertools itertoolsmodule.c # Functions creating iterators for efficient looping |
| 116 | atexit atexitmodule.c # Register functions to be run at interpreter-shutdown |
| 117 | _signal -DPy_BUILD_CORE_BUILTIN -I$(srcdir)/Include/internal signalmodule.c |
| 118 | _stat _stat.c # stat.h interface |
| 119 | time -DPy_BUILD_CORE_BUILTIN -I$(srcdir)/Include/internal timemodule.c # -lm # time operations and variables |
| 120 | _thread -DPy_BUILD_CORE_BUILTIN -I$(srcdir)/Include/internal _threadmodule.c # low-level threading interface |
| 121 | |
| 122 | # access to ISO C locale support |
| 123 | _locale -DPy_BUILD_CORE_BUILTIN _localemodule.c # -lintl |
| 124 | |
| 125 | # Standard I/O baseline |
| 126 | _io -DPy_BUILD_CORE_BUILTIN -I$(srcdir)/Include/internal -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 |
| 127 | |
| 128 | # faulthandler module |
| 129 | faulthandler faulthandler.c |
| 130 | |
| 131 | # debug tool to trace memory blocks allocated by Python |
| 132 | # |
| 133 | # bpo-35053: The module must be builtin since _Py_NewReference() |
| 134 | # can call _PyTraceMalloc_NewReference(). |
| 135 | _tracemalloc _tracemalloc.c hashtable.c |
| 136 | |
| 137 | # The rest of the modules listed in this file are all commented out by |
| 138 | # default. Usually they can be detected and built as dynamically |
| 139 | # loaded modules by the new setup.py script added in Python 2.1. If |
| 140 | # you're on a platform that doesn't support dynamic loading, want to |
| 141 | # compile modules statically into the Python binary, or need to |
| 142 | # specify some odd set of compiler switches, you can uncomment the |
| 143 | # appropriate lines below. |
| 144 | |
| 145 | # ====================================================================== |
| 146 | |
| 147 | # The Python symtable module depends on .h files that setup.py doesn't track |
| 148 | _symtable symtablemodule.c |
| 149 | |
| 150 | # Uncommenting the following line tells makesetup that all following |
| 151 | # modules are to be built as shared libraries (see above for more |
| 152 | # detail; also note that *static* or *disabled* cancels this effect): |
| 153 | |
| 154 | #*shared* |
| 155 | |
| 156 | # GNU readline. Unlike previous Python incarnations, GNU readline is |
| 157 | # now incorporated in an optional module, configured in the Setup file |
| 158 | # instead of by a configure script switch. You may have to insert a |
| 159 | # -L option pointing to the directory where libreadline.* lives, |
| 160 | # and you may have to change -ltermcap to -ltermlib or perhaps remove |
| 161 | # it, depending on your system -- see the GNU readline instructions. |
| 162 | # It's okay for this to be a shared library, too. |
| 163 | |
| 164 | #readline readline.c -lreadline -ltermcap |
| 165 | |
| 166 | |
| 167 | # Modules that should always be present (non UNIX dependent): |
| 168 | |
| 169 | #array arraymodule.c # array objects |
| 170 | #cmath cmathmodule.c _math.c # -lm # complex math library functions |
| 171 | #math mathmodule.c _math.c # -lm # math library functions, e.g. sin() |
| 172 | #_contextvars _contextvarsmodule.c # Context Variables |
| 173 | #_struct _struct.c # binary structure packing/unpacking |
| 174 | #_weakref _weakref.c # basic weak reference support |
| 175 | #_testcapi _testcapimodule.c # Python C API test module |
| 176 | #_testinternalcapi _testinternalcapi.c -I$(srcdir)/Include/internal -DPy_BUILD_CORE_MODULE # Python internal C API test module |
| 177 | #_random _randommodule.c # Random number generator |
| 178 | #_elementtree -I$(srcdir)/Modules/expat -DHAVE_EXPAT_CONFIG_H -DUSE_PYEXPAT_CAPI _elementtree.c # elementtree accelerator |
| 179 | #_pickle _pickle.c # pickle accelerator |
| 180 | #_datetime _datetimemodule.c # datetime accelerator |
| 181 | #_bisect _bisectmodule.c # Bisection algorithms |
| 182 | #_heapq _heapqmodule.c # Heap queue algorithm |
| 183 | #_asyncio _asynciomodule.c # Fast asyncio Future |
| 184 | #_json -I$(srcdir)/Include/internal -DPy_BUILD_CORE_BUILTIN _json.c # _json speedups |
| 185 | #_statistics _statisticsmodule.c # statistics accelerator |
| 186 | |
| 187 | #unicodedata unicodedata.c # static Unicode character database |
| 188 | |
| 189 | |
| 190 | # Modules with some UNIX dependencies -- on by default: |
| 191 | # (If you have a really backward UNIX, select and socket may not be |
| 192 | # supported...) |
| 193 | |
| 194 | #fcntl fcntlmodule.c # fcntl(2) and ioctl(2) |
| 195 | #spwd spwdmodule.c # spwd(3) |
| 196 | #grp grpmodule.c # grp(3) |
| 197 | #select selectmodule.c # select(2); not on ancient System V |
| 198 | |
| 199 | # Memory-mapped files (also works on Win32). |
| 200 | #mmap mmapmodule.c |
| 201 | |
| 202 | # CSV file helper |
| 203 | #_csv _csv.c |
| 204 | |
| 205 | # Socket module helper for socket(2) |
| 206 | #_socket socketmodule.c |
| 207 | |
| 208 | # Socket module helper for SSL support; you must comment out the other |
| 209 | # socket line above, and possibly edit the SSL variable: |
| 210 | #SSL=/usr/local/ssl |
| 211 | #_ssl _ssl.c \ |
| 212 | # -DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \ |
| 213 | # -L$(SSL)/lib -lssl -lcrypto |
| 214 | |
| 215 | # The crypt module is now disabled by default because it breaks builds |
| 216 | # on many systems (where -lcrypt is needed), e.g. Linux (I believe). |
| 217 | |
| 218 | #_crypt _cryptmodule.c # -lcrypt # crypt(3); needs -lcrypt on some systems |
| 219 | |
| 220 | |
| 221 | # Some more UNIX dependent modules -- off by default, since these |
| 222 | # are not supported by all UNIX systems: |
| 223 | |
| 224 | #nis nismodule.c -lnsl # Sun yellow pages -- not everywhere |
| 225 | #termios termios.c # Steen Lumholt's termios module |
| 226 | #resource resource.c # Jeremy Hylton's rlimit interface |
| 227 | |
| 228 | #_posixsubprocess _posixsubprocess.c # POSIX subprocess module helper |
| 229 | |
| 230 | # Multimedia modules -- off by default. |
| 231 | # These don't work for 64-bit platforms!!! |
| 232 | # #993173 says audioop works on 64-bit platforms, though. |
| 233 | # These represent audio samples or images as strings: |
| 234 | |
| 235 | #audioop audioop.c # Operations on audio samples |
| 236 | |
| 237 | |
| 238 | # Note that the _md5 and _sha modules are normally only built if the |
| 239 | # system does not have the OpenSSL libs containing an optimized version. |
| 240 | |
| 241 | # The _md5 module implements the RSA Data Security, Inc. MD5 |
| 242 | # Message-Digest Algorithm, described in RFC 1321. |
| 243 | |
| 244 | #_md5 md5module.c |
| 245 | |
| 246 | |
| 247 | # The _sha module implements the SHA checksum algorithms. |
| 248 | # (NIST's Secure Hash Algorithms.) |
| 249 | #_sha1 sha1module.c |
| 250 | #_sha256 sha256module.c |
| 251 | #_sha512 sha512module.c |
| 252 | #_sha3 _sha3/sha3module.c |
| 253 | |
| 254 | # _blake module |
| 255 | #_blake2 _blake2/blake2module.c _blake2/blake2b_impl.c _blake2/blake2s_impl.c |
| 256 | |
| 257 | # The _tkinter module. |
| 258 | # |
| 259 | # The command for _tkinter is long and site specific. Please |
| 260 | # uncomment and/or edit those parts as indicated. If you don't have a |
| 261 | # specific extension (e.g. Tix or BLT), leave the corresponding line |
| 262 | # commented out. (Leave the trailing backslashes in! If you |
| 263 | # experience strange errors, you may want to join all uncommented |
| 264 | # lines and remove the backslashes -- the backslash interpretation is |
| 265 | # done by the shell's "read" command and it may not be implemented on |
| 266 | # every system. |
| 267 | |
| 268 | # *** Always uncomment this (leave the leading underscore in!): |
| 269 | # _tkinter _tkinter.c tkappinit.c -DWITH_APPINIT \ |
| 270 | # *** Uncomment and edit to reflect where your Tcl/Tk libraries are: |
| 271 | # -L/usr/local/lib \ |
| 272 | # *** Uncomment and edit to reflect where your Tcl/Tk headers are: |
| 273 | # -I/usr/local/include \ |
| 274 | # *** Uncomment and edit to reflect where your X11 header files are: |
| 275 | # -I/usr/X11R6/include \ |
| 276 | # *** Or uncomment this for Solaris: |
| 277 | # -I/usr/openwin/include \ |
| 278 | # *** Uncomment and edit for Tix extension only: |
| 279 | # -DWITH_TIX -ltix8.1.8.2 \ |
| 280 | # *** Uncomment and edit for BLT extension only: |
| 281 | # -DWITH_BLT -I/usr/local/blt/blt8.0-unoff/include -lBLT8.0 \ |
| 282 | # *** Uncomment and edit for PIL (TkImaging) extension only: |
| 283 | # (See http://www.pythonware.com/products/pil/ for more info) |
| 284 | # -DWITH_PIL -I../Extensions/Imaging/libImaging tkImaging.c \ |
| 285 | # *** Uncomment and edit for TOGL extension only: |
| 286 | # -DWITH_TOGL togl.c \ |
| 287 | # *** Uncomment and edit to reflect your Tcl/Tk versions: |
| 288 | # -ltk8.2 -ltcl8.2 \ |
| 289 | # *** Uncomment and edit to reflect where your X11 libraries are: |
| 290 | # -L/usr/X11R6/lib \ |
| 291 | # *** Or uncomment this for Solaris: |
| 292 | # -L/usr/openwin/lib \ |
| 293 | # *** Uncomment these for TOGL extension only: |
| 294 | # -lGL -lGLU -lXext -lXmu \ |
| 295 | # *** Uncomment for AIX: |
| 296 | # -lld \ |
| 297 | # *** Always uncomment this; X11 libraries to link with: |
| 298 | # -lX11 |
| 299 | |
| 300 | # Lance Ellinghaus's syslog module |
| 301 | #syslog syslogmodule.c # syslog daemon interface |
| 302 | |
| 303 | |
| 304 | # Curses support, requiring the System V version of curses, often |
| 305 | # provided by the ncurses library. e.g. on Linux, link with -lncurses |
| 306 | # instead of -lcurses). |
| 307 | |
| 308 | #_curses _cursesmodule.c -lcurses -ltermcap |
| 309 | # Wrapper for the panel library that's part of ncurses and SYSV curses. |
| 310 | #_curses_panel _curses_panel.c -lpanel -lncurses |
| 311 | |
| 312 | |
| 313 | # Modules that provide persistent dictionary-like semantics. You will |
| 314 | # probably want to arrange for at least one of them to be available on |
| 315 | # your machine, though none are defined by default because of library |
| 316 | # dependencies. The Python module dbm/__init__.py provides an |
| 317 | # implementation independent wrapper for these; dbm/dumb.py provides |
| 318 | # similar functionality (but slower of course) implemented in Python. |
| 319 | |
| 320 | #_dbm _dbmmodule.c # dbm(3) may require -lndbm or similar |
| 321 | |
| 322 | # Anthony Baxter's gdbm module. GNU dbm(3) will require -lgdbm: |
| 323 | |
| 324 | #_gdbm _gdbmmodule.c -I/usr/local/include -L/usr/local/lib -lgdbm |
| 325 | |
| 326 | |
| 327 | # Helper module for various ascii-encoders |
| 328 | #binascii binascii.c |
| 329 | |
| 330 | # Fred Drake's interface to the Python parser |
| 331 | #parser parsermodule.c |
| 332 | |
| 333 | |
| 334 | # Andrew Kuchling's zlib module. |
| 335 | # This require zlib 1.1.3 (or later). |
| 336 | # See http://www.gzip.org/zlib/ |
| 337 | #zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz |
| 338 | |
| 339 | # Interface to the Expat XML parser |
| 340 | # More information on Expat can be found at www.libexpat.org. |
| 341 | # |
| 342 | #pyexpat expat/xmlparse.c expat/xmlrole.c expat/xmltok.c pyexpat.c -I$(srcdir)/Modules/expat -DHAVE_EXPAT_CONFIG_H -DXML_POOR_ENTROPY -DUSE_PYEXPAT_CAPI |
| 343 | |
| 344 | # Hye-Shik Chang's CJKCodecs |
| 345 | |
| 346 | # multibytecodec is required for all the other CJK codec modules |
| 347 | #_multibytecodec cjkcodecs/multibytecodec.c |
| 348 | |
| 349 | #_codecs_cn cjkcodecs/_codecs_cn.c |
| 350 | #_codecs_hk cjkcodecs/_codecs_hk.c |
| 351 | #_codecs_iso2022 cjkcodecs/_codecs_iso2022.c |
| 352 | #_codecs_jp cjkcodecs/_codecs_jp.c |
| 353 | #_codecs_kr cjkcodecs/_codecs_kr.c |
| 354 | #_codecs_tw cjkcodecs/_codecs_tw.c |
| 355 | |
| 356 | # Example -- included for reference only: |
| 357 | # xx xxmodule.c |
| 358 | |
| 359 | # Another example -- the 'xxsubtype' module shows C-level subtyping in action |
| 360 | xxsubtype xxsubtype.c |
| 361 | |
| 362 | # Uncommenting the following line tells makesetup that all following modules |
| 363 | # are not built (see above for more detail). |
| 364 | # |
| 365 | #*disabled* |
| 366 | # |
| 367 | #_sqlite3 _tkinter _curses pyexpat |
| 368 | #_codecs_jp _codecs_kr _codecs_tw unicodedata |