• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 enabled here will not be compiled by the setup.py script,
15# so the file can be used to override setup.py's behavior.
16
17# Lines have the following structure:
18#
19# <module> ... [<sourcefile> ...] [<cpparg> ...] [<library> ...]
20#
21# <sourcefile> is anything ending in .c (.C, .cc, .c++ are C++ files)
22# <cpparg> is anything starting with -I, -D, -U or -C
23# <library> is anything ending in .a or beginning with -l or -L
24# <module> is anything else but should be a valid Python
25# identifier (letters, digits, underscores, beginning with non-digit)
26#
27# (As the makesetup script changes, it may recognize some other
28# arguments as well, e.g. *.so and *.sl as libraries.  See the big
29# case statement in the makesetup script.)
30#
31# Lines can also have the form
32#
33# <name> = <value>
34#
35# which defines a Make variable definition inserted into Makefile.in
36#
37# Finally, if a line contains just the word "*shared*" (without the
38# quotes but with the stars), then the following modules will not be
39# built statically.  The build process works like this:
40#
41# 1. Build all modules that are declared as static in Modules/Setup,
42#    combine them into libpythonxy.a, combine that into python.
43# 2. Build all modules that are listed as shared in Modules/Setup.
44# 3. Invoke setup.py. That builds all modules that
45#    a) are not builtin, and
46#    b) are not listed in Modules/Setup, and
47#    c) can be build on the target
48#
49# Therefore, modules declared to be shared will not be
50# included in the config.c file, nor in the list of objects to be
51# added to the library archive, and their linker options won't be
52# added to the linker options. Rules to create their .o files and
53# their shared libraries will still be added to the Makefile, and
54# their names will be collected in the Make variable SHAREDMODS.  This
55# is used to build modules as shared libraries.  (They can be
56# installed using "make sharedinstall", which is implied by the
57# toplevel "make install" target.)  (For compatibility,
58# *noconfig* has the same effect as *shared*.)
59#
60# In addition, *static* explicitly declares the following modules to
61# be static.  Lines containing "*static*" and "*shared*" may thus
62# alternate throughout this file.
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.
76DESTLIB=$(LIBDEST)
77MACHDESTLIB=$(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.
85DESTPATH=
86
87# Site specific path components -- should begin with : if non-empty
88SITEPATH=
89
90# Standard path components for test modules
91TESTPATH=
92
93# Path components for machine- or system-dependent modules and shared libraries
94MACHDEPPATH=:$(PLATDIR)
95EXTRAMACHDEPPATH=
96
97COREPYTHONPATH=$(DESTPATH)$(SITEPATH)$(TESTPATH)$(MACHDEPPATH)$(EXTRAMACHDEPPATH)
98PYTHONPATH=$(COREPYTHONPATH)
99
100
101# The modules listed here can't be built as shared libraries for
102# various reasons; therefore they are listed here instead of in the
103# normal order.
104
105# This only contains the minimal set of modules required to run the
106# setup.py script in the root of the Python source tree.
107
108posix posixmodule.c		# posix (UNIX) system calls
109errno errnomodule.c		# posix (UNIX) errno values
110pwd pwdmodule.c			# this is needed to find out the user's home dir
111				# if $HOME is not set
112_sre _sre.c			# Fredrik Lundh's new regular expressions
113_codecs _codecsmodule.c		# access to the builtin codecs and codec registry
114_weakref _weakref.c		# weak references
115_functools _functoolsmodule.c   # Tools for working with functions and callable objects
116_operator _operator.c	        # operator.add() and similar goodies
117_collections _collectionsmodule.c # Container types
118itertools itertoolsmodule.c    # Functions creating iterators for efficient looping
119atexit atexitmodule.c      # Register functions to be run at interpreter-shutdown
120_signal signalmodule.c
121_stat _stat.c			# stat.h interface
122time timemodule.c	# -lm # time operations and variables
123
124# access to ISO C locale support
125_locale _localemodule.c  # -lintl
126
127# Standard I/O baseline
128_io -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
129
130# The zipimport module is always imported at startup. Having it as a
131# builtin module avoids some bootstrapping problems and reduces overhead.
132zipimport zipimport.c
133
134# faulthandler module
135faulthandler faulthandler.c
136
137# debug tool to trace memory blocks allocated by Python
138_tracemalloc _tracemalloc.c hashtable.c
139
140# The rest of the modules listed in this file are all commented out by
141# default.  Usually they can be detected and built as dynamically
142# loaded modules by the new setup.py script added in Python 2.1.  If
143# you're on a platform that doesn't support dynamic loading, want to
144# compile modules statically into the Python binary, or need to
145# specify some odd set of compiler switches, you can uncomment the
146# appropriate lines below.
147
148# ======================================================================
149
150# The Python symtable module depends on .h files that setup.py doesn't track
151_symtable symtablemodule.c
152
153# Uncommenting the following line tells makesetup that all following
154# modules are to be built as shared libraries (see above for more
155# detail; also note that *static* reverses this effect):
156
157#*shared*
158
159# GNU readline.  Unlike previous Python incarnations, GNU readline is
160# now incorporated in an optional module, configured in the Setup file
161# instead of by a configure script switch.  You may have to insert a
162# -L option pointing to the directory where libreadline.* lives,
163# and you may have to change -ltermcap to -ltermlib or perhaps remove
164# it, depending on your system -- see the GNU readline instructions.
165# It's okay for this to be a shared library, too.
166
167#readline readline.c -lreadline -ltermcap
168
169
170# Modules that should always be present (non UNIX dependent):
171
172#array arraymodule.c	# array objects
173#cmath cmathmodule.c _math.c # -lm # complex math library functions
174#math mathmodule.c _math.c # -lm # math library functions, e.g. sin()
175#_struct _struct.c	# binary structure packing/unpacking
176#_weakref _weakref.c	# basic weak reference support
177#_testcapi _testcapimodule.c    # Python C API test module
178#_random _randommodule.c	# Random number generator
179#_elementtree -I$(srcdir)/Modules/expat -DHAVE_EXPAT_CONFIG_H -DUSE_PYEXPAT_CAPI _elementtree.c	# elementtree accelerator
180#_pickle _pickle.c	# pickle accelerator
181#_datetime _datetimemodule.c	# datetime accelerator
182#_bisect _bisectmodule.c	# Bisection algorithms
183#_heapq _heapqmodule.c	# Heap queue algorithm
184#_asyncio _asynciomodule.c  # Fast asyncio Future
185
186#unicodedata unicodedata.c    # static Unicode character database
187
188
189# Modules with some UNIX dependencies -- on by default:
190# (If you have a really backward UNIX, select and socket may not be
191# supported...)
192
193#fcntl fcntlmodule.c	# fcntl(2) and ioctl(2)
194#spwd spwdmodule.c		# spwd(3)
195#grp grpmodule.c		# grp(3)
196#select selectmodule.c	# select(2); not on ancient System V
197
198# Memory-mapped files (also works on Win32).
199#mmap mmapmodule.c
200
201# CSV file helper
202#_csv _csv.c
203
204# Socket module helper for socket(2)
205#_socket socketmodule.c
206
207# Socket module helper for SSL support; you must comment out the other
208# socket line above, and possibly edit the SSL variable:
209#SSL=/usr/local/ssl
210#_ssl _ssl.c \
211#	-DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \
212#	-L$(SSL)/lib -lssl -lcrypto
213
214# The crypt module is now disabled by default because it breaks builds
215# on many systems (where -lcrypt is needed), e.g. Linux (I believe).
216#
217# First, look at Setup.config; configure may have set this for you.
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
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# First, look at Setup.config; configure may have set this for you.
309
310#_curses _cursesmodule.c -lcurses -ltermcap
311# Wrapper for the panel library that's part of ncurses and SYSV curses.
312#_curses_panel _curses_panel.c -lpanel -lncurses
313
314
315# Modules that provide persistent dictionary-like semantics.  You will
316# probably want to arrange for at least one of them to be available on
317# your machine, though none are defined by default because of library
318# dependencies.  The Python module dbm/__init__.py provides an
319# implementation independent wrapper for these; dbm/dumb.py provides
320# similar functionality (but slower of course) implemented in Python.
321
322# The standard Unix dbm module has been moved to Setup.config so that
323# it will be compiled as a shared library by default.  Compiling it as
324# a built-in module causes conflicts with the pybsddb3 module since it
325# creates a static dependency on an out-of-date version of db.so.
326#
327# First, look at Setup.config; configure may have set this for you.
328
329#_dbm _dbmmodule.c 	# dbm(3) may require -lndbm or similar
330
331# Anthony Baxter's gdbm module.  GNU dbm(3) will require -lgdbm:
332#
333# First, look at Setup.config; configure may have set this for you.
334
335#_gdbm _gdbmmodule.c -I/usr/local/include -L/usr/local/lib -lgdbm
336
337
338# Helper module for various ascii-encoders
339#binascii binascii.c
340
341# Fred Drake's interface to the Python parser
342#parser parsermodule.c
343
344
345# Lee Busby's SIGFPE modules.
346# The library to link fpectl with is platform specific.
347# Choose *one* of the options below for fpectl:
348
349# For SGI IRIX (tested on 5.3):
350#fpectl fpectlmodule.c -lfpe
351
352# For Solaris with SunPro compiler (tested on Solaris 2.5 with SunPro C 4.2):
353# (Without the compiler you don't have -lsunmath.)
354#fpectl fpectlmodule.c -R/opt/SUNWspro/lib -lsunmath -lm
355
356# For other systems: see instructions in fpectlmodule.c.
357#fpectl fpectlmodule.c ...
358
359# Test module for fpectl.  No extra libraries needed.
360#fpetest fpetestmodule.c
361
362# Andrew Kuchling's zlib module.
363# This require zlib 1.1.3 (or later).
364# See http://www.gzip.org/zlib/
365#zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz
366
367# Interface to the Expat XML parser
368#
369# Expat was written by James Clark and is now maintained by a group of
370# developers on SourceForge; see www.libexpat.org for more
371# information.  The pyexpat module was written by Paul Prescod after a
372# prototype by Jack Jansen.  Source of Expat 1.95.2 is included in
373# Modules/expat/.  Usage of a system shared libexpat.so/expat.dll is
374# not advised.
375#
376# More information on Expat can be found at www.libexpat.org.
377#
378#pyexpat expat/xmlparse.c expat/xmlrole.c expat/xmltok.c pyexpat.c -I$(srcdir)/Modules/expat -DHAVE_EXPAT_CONFIG_H -DUSE_PYEXPAT_CAPI
379
380# Hye-Shik Chang's CJKCodecs
381
382# multibytecodec is required for all the other CJK codec modules
383#_multibytecodec cjkcodecs/multibytecodec.c
384
385#_codecs_cn cjkcodecs/_codecs_cn.c
386#_codecs_hk cjkcodecs/_codecs_hk.c
387#_codecs_iso2022 cjkcodecs/_codecs_iso2022.c
388#_codecs_jp cjkcodecs/_codecs_jp.c
389#_codecs_kr cjkcodecs/_codecs_kr.c
390#_codecs_tw cjkcodecs/_codecs_tw.c
391
392# Example -- included for reference only:
393# xx xxmodule.c
394
395# Another example -- the 'xxsubtype' module shows C-level subtyping in action
396xxsubtype xxsubtype.c
397