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