ยปCore Development>Code coverage>Misc/BeOS-setup.py

Python code coverage for Misc/BeOS-setup.py

#countcontent
1n/a# Autodetecting setup.py script for building the Python extensions
2n/a#
3n/a# Modified for BeOS build. Donn Cave, March 27 2001.
4n/a
5n/a__version__ = "special BeOS after 1.37"
6n/a
7n/aimport sys, os
8n/afrom distutils import sysconfig
9n/afrom distutils import text_file
10n/afrom distutils.errors import *
11n/afrom distutils.core import Extension, setup
12n/afrom distutils.command.build_ext import build_ext
13n/a
14n/a# This global variable is used to hold the list of modules to be disabled.
15n/adisabled_module_list = ['dbm', 'mmap', 'resource', 'nis']
16n/a
17n/adef find_file(filename, std_dirs, paths):
18n/a """Searches for the directory where a given file is located,
19n/a and returns a possibly-empty list of additional directories, or None
20n/a if the file couldn't be found at all.
21n/a
22n/a 'filename' is the name of a file, such as readline.h or libcrypto.a.
23n/a 'std_dirs' is the list of standard system directories; if the
24n/a file is found in one of them, no additional directives are needed.
25n/a 'paths' is a list of additional locations to check; if the file is
26n/a found in one of them, the resulting list will contain the directory.
27n/a """
28n/a
29n/a # Check the standard locations
30n/a for dir in std_dirs:
31n/a f = os.path.join(dir, filename)
32n/a if os.path.exists(f): return []
33n/a
34n/a # Check the additional directories
35n/a for dir in paths:
36n/a f = os.path.join(dir, filename)
37n/a if os.path.exists(f):
38n/a return [dir]
39n/a
40n/a # Not found anywhere
41n/a return None
42n/a
43n/adef find_library_file(compiler, libname, std_dirs, paths):
44n/a filename = compiler.library_filename(libname, lib_type='shared')
45n/a result = find_file(filename, std_dirs, paths)
46n/a if result is not None: return result
47n/a
48n/a filename = compiler.library_filename(libname, lib_type='static')
49n/a result = find_file(filename, std_dirs, paths)
50n/a return result
51n/a
52n/adef module_enabled(extlist, modname):
53n/a """Returns whether the module 'modname' is present in the list
54n/a of extensions 'extlist'."""
55n/a extlist = [ext for ext in extlist if ext.name == modname]
56n/a return len(extlist)
57n/a
58n/aclass PyBuildExt(build_ext):
59n/a
60n/a def build_extensions(self):
61n/a
62n/a # Detect which modules should be compiled
63n/a self.detect_modules()
64n/a
65n/a # Remove modules that are present on the disabled list
66n/a self.extensions = [ext for ext in self.extensions
67n/a if ext.name not in disabled_module_list]
68n/a
69n/a # Fix up the autodetected modules, prefixing all the source files
70n/a # with Modules/ and adding Python's include directory to the path.
71n/a (srcdir,) = sysconfig.get_config_vars('srcdir')
72n/a
73n/a # Figure out the location of the source code for extension modules
74n/a moddir = os.path.join(os.getcwd(), srcdir, 'Modules')
75n/a moddir = os.path.normpath(moddir)
76n/a srcdir, tail = os.path.split(moddir)
77n/a srcdir = os.path.normpath(srcdir)
78n/a moddir = os.path.normpath(moddir)
79n/a
80n/a # Fix up the paths for scripts, too
81n/a self.distribution.scripts = [os.path.join(srcdir, filename)
82n/a for filename in self.distribution.scripts]
83n/a
84n/a for ext in self.extensions[:]:
85n/a ext.sources = [ os.path.join(moddir, filename)
86n/a for filename in ext.sources ]
87n/a ext.include_dirs.append( '.' ) # to get config.h
88n/a ext.include_dirs.append( os.path.join(srcdir, './Include') )
89n/a
90n/a # If a module has already been built statically,
91n/a # don't build it here
92n/a if ext.name in sys.builtin_module_names:
93n/a self.extensions.remove(ext)
94n/a
95n/a # Parse Modules/Setup to figure out which modules are turned
96n/a # on in the file.
97n/a input = text_file.TextFile('Modules/Setup', join_lines=1)
98n/a remove_modules = []
99n/a while 1:
100n/a line = input.readline()
101n/a if not line: break
102n/a line = line.split()
103n/a remove_modules.append( line[0] )
104n/a input.close()
105n/a
106n/a for ext in self.extensions[:]:
107n/a if ext.name in remove_modules:
108n/a self.extensions.remove(ext)
109n/a
110n/a # When you run "make CC=altcc" or something similar, you really want
111n/a # those environment variables passed into the setup.py phase. Here's
112n/a # a small set of useful ones.
113n/a compiler = os.environ.get('CC')
114n/a linker_so = os.environ.get('LDSHARED')
115n/a args = {}
116n/a # unfortunately, distutils doesn't let us provide separate C and C++
117n/a # compilers
118n/a if compiler is not None:
119n/a args['compiler_so'] = compiler
120n/a if linker_so is not None:
121n/a args['linker_so'] = linker_so + ' -shared'
122n/a self.compiler.set_executables(**args)
123n/a
124n/a build_ext.build_extensions(self)
125n/a
126n/a def build_extension(self, ext):
127n/a
128n/a try:
129n/a build_ext.build_extension(self, ext)
130n/a except (CCompilerError, DistutilsError), why:
131n/a self.announce('WARNING: building of extension "%s" failed: %s' %
132n/a (ext.name, sys.exc_info()[1]))
133n/a
134n/a def get_platform (self):
135n/a # Get value of sys.platform
136n/a platform = sys.platform
137n/a if platform[:6] =='cygwin':
138n/a platform = 'cygwin'
139n/a elif platform[:4] =='beos':
140n/a platform = 'beos'
141n/a
142n/a return platform
143n/a
144n/a def detect_modules(self):
145n/a try:
146n/a belibs = os.environ['BELIBRARIES'].split(';')
147n/a except KeyError:
148n/a belibs = ['/boot/beos/system/lib']
149n/a belibs.append('/boot/home/config/lib')
150n/a self.compiler.library_dirs.append('/boot/home/config/lib')
151n/a try:
152n/a beincl = os.environ['BEINCLUDES'].split(';')
153n/a except KeyError:
154n/a beincl = []
155n/a beincl.append('/boot/home/config/include')
156n/a self.compiler.include_dirs.append('/boot/home/config/include')
157n/a # lib_dirs and inc_dirs are used to search for files;
158n/a # if a file is found in one of those directories, it can
159n/a # be assumed that no additional -I,-L directives are needed.
160n/a lib_dirs = belibs
161n/a inc_dirs = beincl
162n/a exts = []
163n/a
164n/a platform = self.get_platform()
165n/a
166n/a # Check for MacOS X, which doesn't need libm.a at all
167n/a math_libs = ['m']
168n/a if platform in ['Darwin1.2', 'beos']:
169n/a math_libs = []
170n/a
171n/a # XXX Omitted modules: gl, pure, dl, SGI-specific modules
172n/a
173n/a #
174n/a # The following modules are all pretty straightforward, and compile
175n/a # on pretty much any POSIXish platform.
176n/a #
177n/a
178n/a # Some modules that are normally always on:
179n/a exts.append( Extension('_weakref', ['_weakref.c']) )
180n/a exts.append( Extension('_symtable', ['symtablemodule.c']) )
181n/a
182n/a # array objects
183n/a exts.append( Extension('array', ['arraymodule.c']) )
184n/a # complex math library functions
185n/a exts.append( Extension('cmath', ['cmathmodule.c'],
186n/a libraries=math_libs) )
187n/a
188n/a # math library functions, e.g. sin()
189n/a exts.append( Extension('math', ['mathmodule.c'],
190n/a libraries=math_libs) )
191n/a # fast string operations implemented in C
192n/a exts.append( Extension('strop', ['stropmodule.c']) )
193n/a # time operations and variables
194n/a exts.append( Extension('time', ['timemodule.c'],
195n/a libraries=math_libs) )
196n/a # operator.add() and similar goodies
197n/a exts.append( Extension('operator', ['operator.c']) )
198n/a # access to the built-in codecs and codec registry
199n/a exts.append( Extension('_codecs', ['_codecsmodule.c']) )
200n/a # Python C API test module
201n/a exts.append( Extension('_testcapi', ['_testcapimodule.c']) )
202n/a # static Unicode character database
203n/a exts.append( Extension('unicodedata', ['unicodedata.c']) )
204n/a # access to ISO C locale support
205n/a exts.append( Extension('_locale', ['_localemodule.c']) )
206n/a
207n/a # Modules with some UNIX dependencies -- on by default:
208n/a # (If you have a really backward UNIX, select and socket may not be
209n/a # supported...)
210n/a
211n/a # fcntl(2) and ioctl(2)
212n/a exts.append( Extension('fcntl', ['fcntlmodule.c']) )
213n/a # pwd(3)
214n/a exts.append( Extension('pwd', ['pwdmodule.c']) )
215n/a # grp(3)
216n/a exts.append( Extension('grp', ['grpmodule.c']) )
217n/a # posix (UNIX) errno values
218n/a exts.append( Extension('errno', ['errnomodule.c']) )
219n/a # select(2); not on ancient System V
220n/a exts.append( Extension('select', ['selectmodule.c']) )
221n/a
222n/a # The md5 module implements the RSA Data Security, Inc. MD5
223n/a # Message-Digest Algorithm, described in RFC 1321. The necessary files
224n/a # md5c.c and md5.h are included here.
225n/a exts.append( Extension('md5', ['md5module.c', 'md5c.c']) )
226n/a
227n/a # The sha module implements the SHA checksum algorithm.
228n/a # (NIST's Secure Hash Algorithm.)
229n/a exts.append( Extension('sha', ['shamodule.c']) )
230n/a
231n/a # Helper module for various ascii-encoders
232n/a exts.append( Extension('binascii', ['binascii.c']) )
233n/a
234n/a # Fred Drake's interface to the Python parser
235n/a exts.append( Extension('parser', ['parsermodule.c']) )
236n/a
237n/a # cStringIO and cPickle
238n/a exts.append( Extension('cStringIO', ['cStringIO.c']) )
239n/a exts.append( Extension('cPickle', ['cPickle.c']) )
240n/a
241n/a # Memory-mapped files (also works on Win32).
242n/a exts.append( Extension('mmap', ['mmapmodule.c']) )
243n/a
244n/a # Lance Ellinghaus's syslog daemon interface
245n/a exts.append( Extension('syslog', ['syslogmodule.c']) )
246n/a
247n/a # George Neville-Neil's timing module:
248n/a exts.append( Extension('timing', ['timingmodule.c']) )
249n/a
250n/a #
251n/a # Here ends the simple stuff. From here on, modules need certain
252n/a # libraries, are platform-specific, or present other surprises.
253n/a #
254n/a
255n/a # Multimedia modules
256n/a # These don't work for 64-bit platforms!!!
257n/a # These represent audio samples or images as strings:
258n/a
259n/a # Disabled on 64-bit platforms
260n/a if sys.maxint != 9223372036854775807L:
261n/a # Operations on audio samples
262n/a exts.append( Extension('audioop', ['audioop.c']) )
263n/a # Operations on images
264n/a exts.append( Extension('imageop', ['imageop.c']) )
265n/a # Read SGI RGB image files (but coded portably)
266n/a exts.append( Extension('rgbimg', ['rgbimgmodule.c']) )
267n/a
268n/a # readline
269n/a if self.compiler.find_library_file(lib_dirs, 'readline'):
270n/a readline_libs = ['readline']
271n/a if self.compiler.find_library_file(lib_dirs +
272n/a ['/usr/lib/termcap'],
273n/a 'termcap'):
274n/a readline_libs.append('termcap')
275n/a exts.append( Extension('readline', ['readline.c'],
276n/a library_dirs=['/usr/lib/termcap'],
277n/a libraries=readline_libs) )
278n/a
279n/a # The crypt module is now disabled by default because it breaks builds
280n/a # on many systems (where -lcrypt is needed), e.g. Linux (I believe).
281n/a
282n/a if self.compiler.find_library_file(lib_dirs, 'crypt'):
283n/a libs = ['crypt']
284n/a else:
285n/a libs = []
286n/a exts.append( Extension('crypt', ['cryptmodule.c'], libraries=libs) )
287n/a
288n/a # socket(2)
289n/a # Detect SSL support for the socket module
290n/a ssl_incs = find_file('openssl/ssl.h', inc_dirs,
291n/a ['/usr/local/ssl/include',
292n/a '/usr/contrib/ssl/include/'
293n/a ]
294n/a )
295n/a ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
296n/a ['/usr/local/ssl/lib',
297n/a '/usr/contrib/ssl/lib/'
298n/a ] )
299n/a
300n/a if (ssl_incs is not None and
301n/a ssl_libs is not None):
302n/a exts.append( Extension('_socket', ['socketmodule.c'],
303n/a include_dirs = ssl_incs,
304n/a library_dirs = ssl_libs,
305n/a libraries = ['ssl', 'crypto'],
306n/a define_macros = [('USE_SSL',1)] ) )
307n/a else:
308n/a exts.append( Extension('_socket', ['socketmodule.c']) )
309n/a
310n/a # Modules that provide persistent dictionary-like semantics. You will
311n/a # probably want to arrange for at least one of them to be available on
312n/a # your machine, though none are defined by default because of library
313n/a # dependencies. The Python module anydbm.py provides an
314n/a # implementation independent wrapper for these; dumbdbm.py provides
315n/a # similar functionality (but slower of course) implemented in Python.
316n/a
317n/a # The standard Unix dbm module:
318n/a if platform not in ['cygwin']:
319n/a if (self.compiler.find_library_file(lib_dirs, 'ndbm')):
320n/a exts.append( Extension('dbm', ['dbmmodule.c'],
321n/a libraries = ['ndbm'] ) )
322n/a else:
323n/a exts.append( Extension('dbm', ['dbmmodule.c']) )
324n/a
325n/a # Anthony Baxter's gdbm module. GNU dbm(3) will require -lgdbm:
326n/a if (self.compiler.find_library_file(lib_dirs, 'gdbm')):
327n/a exts.append( Extension('gdbm', ['gdbmmodule.c'],
328n/a libraries = ['gdbm'] ) )
329n/a
330n/a # Berkeley DB interface.
331n/a #
332n/a # This requires the Berkeley DB code, see
333n/a # ftp://ftp.cs.berkeley.edu/pub/4bsd/db.1.85.tar.gz
334n/a #
335n/a # Edit the variables DB and DBPORT to point to the db top directory
336n/a # and the subdirectory of PORT where you built it.
337n/a #
338n/a # (See http://electricrain.com/greg/python/bsddb3/ for an interface to
339n/a # BSD DB 3.x.)
340n/a
341n/a dblib = []
342n/a if self.compiler.find_library_file(lib_dirs, 'db'):
343n/a dblib = ['db']
344n/a
345n/a db185_incs = find_file('db_185.h', inc_dirs,
346n/a ['/usr/include/db3', '/usr/include/db2'])
347n/a db_inc = find_file('db.h', inc_dirs, ['/usr/include/db1'])
348n/a if db185_incs is not None:
349n/a exts.append( Extension('bsddb', ['bsddbmodule.c'],
350n/a include_dirs = db185_incs,
351n/a define_macros=[('HAVE_DB_185_H',1)],
352n/a libraries = dblib ) )
353n/a elif db_inc is not None:
354n/a exts.append( Extension('bsddb', ['bsddbmodule.c'],
355n/a include_dirs = db_inc,
356n/a libraries = dblib) )
357n/a
358n/a # Unix-only modules
359n/a if platform == 'win32':
360n/a # Steen Lumholt's termios module
361n/a exts.append( Extension('termios', ['termios.c']) )
362n/a # Jeremy Hylton's rlimit interface
363n/a if platform not in ['cygwin']:
364n/a exts.append( Extension('resource', ['resource.c']) )
365n/a
366n/a # Generic dynamic loading module
367n/a #exts.append( Extension('dl', ['dlmodule.c']) )
368n/a
369n/a # Sun yellow pages. Some systems have the functions in libc.
370n/a if platform not in ['cygwin']:
371n/a if (self.compiler.find_library_file(lib_dirs, 'nsl')):
372n/a libs = ['nsl']
373n/a else:
374n/a libs = []
375n/a exts.append( Extension('nis', ['nismodule.c'],
376n/a libraries = libs) )
377n/a
378n/a # Curses support, requring the System V version of curses, often
379n/a # provided by the ncurses library.
380n/a if (self.compiler.find_library_file(lib_dirs, 'ncurses')):
381n/a curses_libs = ['ncurses']
382n/a exts.append( Extension('_curses', ['_cursesmodule.c'],
383n/a libraries = curses_libs) )
384n/a elif (self.compiler.find_library_file(lib_dirs, 'curses')):
385n/a if (self.compiler.find_library_file(lib_dirs, 'terminfo')):
386n/a curses_libs = ['curses', 'terminfo']
387n/a else:
388n/a curses_libs = ['curses', 'termcap']
389n/a
390n/a exts.append( Extension('_curses', ['_cursesmodule.c'],
391n/a libraries = curses_libs) )
392n/a
393n/a # If the curses module is enabled, check for the panel module
394n/a if (os.path.exists('Modules/_curses_panel.c') and
395n/a module_enabled(exts, '_curses') and
396n/a self.compiler.find_library_file(lib_dirs, 'panel')):
397n/a exts.append( Extension('_curses_panel', ['_curses_panel.c'],
398n/a libraries = ['panel'] + curses_libs) )
399n/a
400n/a
401n/a
402n/a # Lee Busby's SIGFPE modules.
403n/a # The library to link fpectl with is platform specific.
404n/a # Choose *one* of the options below for fpectl:
405n/a
406n/a if platform == 'irix5':
407n/a # For SGI IRIX (tested on 5.3):
408n/a exts.append( Extension('fpectl', ['fpectlmodule.c'],
409n/a libraries=['fpe']) )
410n/a elif 0: # XXX how to detect SunPro?
411n/a # For Solaris with SunPro compiler (tested on Solaris 2.5 with SunPro C 4.2):
412n/a # (Without the compiler you don't have -lsunmath.)
413n/a #fpectl fpectlmodule.c -R/opt/SUNWspro/lib -lsunmath -lm
414n/a pass
415n/a else:
416n/a # For other systems: see instructions in fpectlmodule.c.
417n/a #fpectl fpectlmodule.c ...
418n/a exts.append( Extension('fpectl', ['fpectlmodule.c']) )
419n/a
420n/a
421n/a # Andrew Kuchling's zlib module.
422n/a # This require zlib 1.1.3 (or later).
423n/a # See http://www.gzip.org/zlib/
424n/a if (self.compiler.find_library_file(lib_dirs, 'z')):
425n/a exts.append( Extension('zlib', ['zlibmodule.c'],
426n/a libraries = ['z']) )
427n/a
428n/a # Interface to the Expat XML parser
429n/a #
430n/a # Expat is written by James Clark and must be downloaded separately
431n/a # (see below). The pyexpat module was written by Paul Prescod after a
432n/a # prototype by Jack Jansen.
433n/a #
434n/a # The Expat dist includes Windows .lib and .dll files. Home page is
435n/a # at http://www.jclark.com/xml/expat.html, the current production
436n/a # release is always ftp://ftp.jclark.com/pub/xml/expat.zip.
437n/a #
438n/a # EXPAT_DIR, below, should point to the expat/ directory created by
439n/a # unpacking the Expat source distribution.
440n/a #
441n/a # Note: the expat build process doesn't yet build a libexpat.a; you
442n/a # can do this manually while we try convince the author to add it. To
443n/a # do so, cd to EXPAT_DIR, run "make" if you have not done so, then
444n/a # run:
445n/a #
446n/a # ar cr libexpat.a xmltok/*.o xmlparse/*.o
447n/a #
448n/a expat_defs = []
449n/a expat_incs = find_file('expat.h', inc_dirs, [])
450n/a if expat_incs is not None:
451n/a # expat.h was found
452n/a expat_defs = [('HAVE_EXPAT_H', 1)]
453n/a else:
454n/a expat_incs = find_file('xmlparse.h', inc_dirs, [])
455n/a
456n/a if (expat_incs is not None and
457n/a self.compiler.find_library_file(lib_dirs, 'expat')):
458n/a exts.append( Extension('pyexpat', ['pyexpat.c'],
459n/a define_macros = expat_defs,
460n/a libraries = ['expat']) )
461n/a
462n/a # Platform-specific libraries
463n/a if platform == 'linux2':
464n/a # Linux-specific modules
465n/a exts.append( Extension('linuxaudiodev', ['linuxaudiodev.c']) )
466n/a
467n/a if platform == 'sunos5':
468n/a # SunOS specific modules
469n/a exts.append( Extension('sunaudiodev', ['sunaudiodev.c']) )
470n/a
471n/a self.extensions.extend(exts)
472n/a
473n/a # Call the method for detecting whether _tkinter can be compiled
474n/a self.detect_tkinter(inc_dirs, lib_dirs)
475n/a
476n/a
477n/a def detect_tkinter(self, inc_dirs, lib_dirs):
478n/a # The _tkinter module.
479n/a
480n/a # Assume we haven't found any of the libraries or include files
481n/a tcllib = tklib = tcl_includes = tk_includes = None
482n/a for version in ['8.4', '8.3', '8.2', '8.1', '8.0']:
483n/a tklib = self.compiler.find_library_file(lib_dirs,
484n/a 'tk' + version )
485n/a tcllib = self.compiler.find_library_file(lib_dirs,
486n/a 'tcl' + version )
487n/a if tklib and tcllib:
488n/a # Exit the loop when we've found the Tcl/Tk libraries
489n/a break
490n/a
491n/a # Now check for the header files
492n/a if tklib and tcllib:
493n/a # Check for the include files on Debian, where
494n/a # they're put in /usr/include/{tcl,tk}X.Y
495n/a debian_tcl_include = [ '/usr/include/tcl' + version ]
496n/a debian_tk_include = [ '/usr/include/tk' + version ] + debian_tcl_include
497n/a tcl_includes = find_file('tcl.h', inc_dirs, debian_tcl_include)
498n/a tk_includes = find_file('tk.h', inc_dirs, debian_tk_include)
499n/a
500n/a if (tcllib is None or tklib is None and
501n/a tcl_includes is None or tk_includes is None):
502n/a # Something's missing, so give up
503n/a return
504n/a
505n/a # OK... everything seems to be present for Tcl/Tk.
506n/a
507n/a include_dirs = [] ; libs = [] ; defs = [] ; added_lib_dirs = []
508n/a for dir in tcl_includes + tk_includes:
509n/a if dir not in include_dirs:
510n/a include_dirs.append(dir)
511n/a
512n/a # Check for various platform-specific directories
513n/a platform = self.get_platform()
514n/a if platform == 'sunos5':
515n/a include_dirs.append('/usr/openwin/include')
516n/a added_lib_dirs.append('/usr/openwin/lib')
517n/a elif os.path.exists('/usr/X11R6/include'):
518n/a include_dirs.append('/usr/X11R6/include')
519n/a added_lib_dirs.append('/usr/X11R6/lib')
520n/a elif os.path.exists('/usr/X11R5/include'):
521n/a include_dirs.append('/usr/X11R5/include')
522n/a added_lib_dirs.append('/usr/X11R5/lib')
523n/a else:
524n/a # Assume default location for X11
525n/a include_dirs.append('/usr/X11/include')
526n/a added_lib_dirs.append('/usr/X11/lib')
527n/a
528n/a # Check for BLT extension
529n/a if self.compiler.find_library_file(lib_dirs + added_lib_dirs, 'BLT8.0'):
530n/a defs.append( ('WITH_BLT', 1) )
531n/a libs.append('BLT8.0')
532n/a
533n/a # Add the Tcl/Tk libraries
534n/a libs.append('tk'+version)
535n/a libs.append('tcl'+version)
536n/a
537n/a if platform in ['aix3', 'aix4']:
538n/a libs.append('ld')
539n/a
540n/a # Finally, link with the X11 libraries
541n/a libs.append('X11')
542n/a
543n/a ext = Extension('_tkinter', ['_tkinter.c', 'tkappinit.c'],
544n/a define_macros=[('WITH_APPINIT', 1)] + defs,
545n/a include_dirs = include_dirs,
546n/a libraries = libs,
547n/a library_dirs = added_lib_dirs,
548n/a )
549n/a self.extensions.append(ext)
550n/a
551n/a # XXX handle these, but how to detect?
552n/a # *** Uncomment and edit for PIL (TkImaging) extension only:
553n/a # -DWITH_PIL -I../Extensions/Imaging/libImaging tkImaging.c \
554n/a # *** Uncomment and edit for TOGL extension only:
555n/a # -DWITH_TOGL togl.c \
556n/a # *** Uncomment these for TOGL extension only:
557n/a # -lGL -lGLU -lXext -lXmu \
558n/a
559n/adef main():
560n/a setup(name = 'Python standard library',
561n/a version = '%d.%d' % sys.version_info[:2],
562n/a cmdclass = {'build_ext':PyBuildExt},
563n/a # The struct module is defined here, because build_ext won't be
564n/a # called unless there's at least one extension module defined.
565n/a ext_modules=[Extension('struct', ['structmodule.c'])],
566n/a
567n/a # Scripts to install
568n/a scripts = ['Tools/scripts/pydoc']
569n/a )
570n/a
571n/a# --install-platlib
572n/aif __name__ == '__main__':
573n/a sysconfig.set_python_build()
574n/a main()