Setup 11 KB

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