blob: 93d62903ecc2cf19addd88c5244dbd09fefc331a [file] [log] [blame]
Guido van Rossumd0fe8451996-08-26 03:02:37 +00001This is Python release 1.4 beta 3
Guido van Rossumfaf681a1996-06-20 14:32:08 +00002=================================
3
Guido van Rossum6d9cc801996-08-01 17:31:22 +00004It's a beta release. Use this if you want to help me iron the last
5wrinkles out of the distribution before I release the real version
61.4. In particular, I'm interested in porting experiences to Unix
7boxes. Python should build out of the box using "./configure; make".
Guido van Rossumfaf681a1996-06-20 14:32:08 +00008Also try running configue with the --with-thread and --with-readline
Guido van Rossumd0fe8451996-08-26 03:02:37 +00009options (described below).
10
Guido van Rossumdfcf35d1996-08-26 17:52:09 +000011I really expect this to be the last beta release. I declare a
12*FEATURE FREEZE* until 1.4 final is released (in a couple of weeks).
13Changes in 1.4 final will be restricted to urgent bugfixes,
14portability enhancements, and added documentation only.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015
Guido van Rossum627b2d71993-12-24 10:39:16 +000016
Guido van Rossum8d7d4ed1996-07-30 21:41:07 +000017What's new in this release?
18---------------------------
Guido van Rossum3ff96dd1996-07-30 18:05:04 +000019
Guido van Rossumdfcf35d1996-08-26 17:52:09 +000020A list of (nearly) everything that changed in each of the 1.4 beta
21releases can be found in the file Misc/NEWS -- together this comprises
22a list of everything that's changed since 1.3.
Guido van Rossum3ff96dd1996-07-30 18:05:04 +000023
24
Guido van Rossum91cb9d21995-04-10 11:47:38 +000025What is Python anyway?
26----------------------
27
28Python is an interpreted object-oriented programming language, and is
Guido van Rossum6d9cc801996-08-01 17:31:22 +000029often compared to Tcl, Perl, Scheme or Java. For a quick summary of
30what Python can mean for a UNIX/C programmer, read Misc/BLURB.LUTZ.
Guido van Rossumdfcf35d1996-08-26 17:52:09 +000031If you have web access, point your browser to http://www.python.org.
Guido van Rossum91cb9d21995-04-10 11:47:38 +000032
33
34If you don't read instructions
35------------------------------
36
37Congratulations on getting this far. :-)
38
39To start building right away (on UNIX): type "./configure" in the
40current directory and when it finishes, type "make". The section
41Build Instructions below is still recommended reading. :-)
42
43
44Copyright issues
45----------------
46
47Python is COPYRIGHTED but free to use for all. See the full copyright
48notice at the end of this file.
49
50The Python distribution is *not* affected by the GNU Public Licence
51(GPL). There are interfaces to some GNU code but these are entirely
52optional and no GNU code is distributed with Python. For all these
53packages, GPL-free public domain versions also exist.
54
Guido van Rossum627b2d71993-12-24 10:39:16 +000055
Guido van Rossum6d9cc801996-08-01 17:31:22 +000056
Guido van Rossumff840491995-09-18 22:02:47 +000057A modest plug
58=============
59
Guido van Rossum0447a321995-10-08 01:22:33 +000060*************************************************************************
Guido van Rossum3ff96dd1996-07-30 18:05:04 +000061* *
Guido van Rossum8d7d4ed1996-07-30 21:41:07 +000062* If you use Python, please consider joining the Python Software *
63* Activity (PSA). See http://www.python.org/psa/. *
64* *
Guido van Rossumd0fe8451996-08-26 03:02:37 +000065* Organizations that make heavy use of Python are especially *
66* encouraged to become corporate members! *
Guido van Rossum3ff96dd1996-07-30 18:05:04 +000067* *
Guido van Rossum0447a321995-10-08 01:22:33 +000068*************************************************************************
Guido van Rossumff840491995-09-18 22:02:47 +000069
Guido van Rossum627b2d71993-12-24 10:39:16 +000070
Guido van Rossum6d9cc801996-08-01 17:31:22 +000071
Guido van Rossum433c8ad1994-08-01 12:07:07 +000072Build instructions
Guido van Rossum91cb9d21995-04-10 11:47:38 +000073==================
Guido van Rossum627b2d71993-12-24 10:39:16 +000074
Guido van Rossum6d9cc801996-08-01 17:31:22 +000075Before you can build Python, you must first configure it.
76Fortunately, the configuration and build process has been streamlined
77for most Unix installations, so all you have to do is type a few
78commands, optionally edit one file, and sit back. There are some
79platforms where things are not quite as smooth; see the platform
80specific notes below. If you want to build for multiple platforms
81sharing the same source tree, see the section on VPATH below.
Guido van Rossum627b2d71993-12-24 10:39:16 +000082
Guido van Rossum6d9cc801996-08-01 17:31:22 +000083You start by running the script "./configure", which figures out your
84system configuration and creates several Makefiles. (It takes a
85minute or two -- please be patient!) When it's done, you are ready to
86run make. You may want to pass options to the configure script -- see
87the section below on configuration options and variables.
88
89To build Python, you normally type "make" in the toplevel directory.
90This will recursively run make in each of the subdirectories Parser,
91Objects, Python and Modules, creating a library file in each one. The
92executable of the interpreter is built in the Modules subdirectory and
93moved up here when it is built. If you want or need to, you can also
94chdir into each subdirectory in turn and run make there manually (do
95the Modules subdirectory last!).
96
97Once you have built an interpreter, see the subsections below on
98testing, configuring additional modules, and installation. If you run
99in trouble, see the next section.
Guido van Rossum627b2d71993-12-24 10:39:16 +0000100
Guido van Rossum0a516c91994-09-12 10:58:40 +0000101
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000102Troubleshooting
103---------------
Guido van Rossum627b2d71993-12-24 10:39:16 +0000104
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000105See also the platform specific notes in the next section.
106
Guido van Rossumfaf681a1996-06-20 14:32:08 +0000107If recursive makes fail, try invoking make as "make MAKE=make".
108
109If you run into other trouble, see section 3 of the FAQ (file
110Misc/FAQ) for hints on what can go wrong, and how to fix it.
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000111
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000112If you rerun the configure script with different options, remove all
113object files by running "make clean" before rebuilding. Believe it or
114not, "make clean" sometimes helps to clean up other inexplicable
115problems as well. Try it before sending in a bug report!
116
Guido van Rossumd0fe8451996-08-26 03:02:37 +0000117If the configure script fails or doesn't seem to find things that
118should be there, inspect the config.log file.
119
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000120
121Platform specific notes
122-----------------------
123
Guido van Rossum0447a321995-10-08 01:22:33 +0000124(Some of these may no longer apply. If you find you can build Python
125on these platforms without the special directions mentioned here, let
126me know so I can remove them!)
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000127
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000128Linux: On Linux version 1.x, once you've built Python, use it to run
129 the regen script in the Lib/linux1 directory. Apparently
130 the files as distributed don't match the system headers on
131 some Linux versions. (The "h2py" command refers to
132 Tools/scripts/h2py.py.) The modules distributed for Linux 2.x
Guido van Rossumd0fe8451996-08-26 03:02:37 +0000133 should be okay. Shared library support now works by default
134 on ELF-based x86 Linux systems.
Guido van Rossum8eca2c21996-02-14 18:37:46 +0000135
Guido van Rossumd0fe8451996-08-26 03:02:37 +0000136AIX: A complete overhaul of the shared library support is now in
137 place. To enable it, uncomment the LINKCC line in the Setup
138 file. See Misc/AIX-NOTES for some notes on how it's done.
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000139
Guido van Rossumd0fe8451996-08-26 03:02:37 +0000140 WARNING! In some versions of AIX 3.x, you get errors about
Guido van Rossuma3b4b611996-07-21 02:48:16 +0000141 Invalid Indent when running the Python test set. This appears
142 to be a bug in the AIX compiler. Rebuild Parser/tokenizer.c
143 using OPT="" or OPT=-g, or use gcc.
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000144
Guido van Rossumd0fe8451996-08-26 03:02:37 +0000145HP-UX: Shared library support now works by default (at least on HP-UX
146 9.x). One other problem remains: the HP ANSI C compiler (cc
147 -Aa) is too pedantic to use, but in K&R mode, it barfs on a
148 few files (complexobject.c, getargs.c and operator.c). Until
149 this is fixed, the following seems to work:
150
151 make -k # this compiles all but a few files
152 make OPT=-Aa # compile the remaining files
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000153
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000154Minix: When using ack, use "CC=cc AR=aal RANLIB=: ./configure"!
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000155
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000156SCO: 1) Everything works much better if you add -U__STDC__ to the
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000157 defs. This is because all the SCO header files are broken.
158 Anything that isn't mentioned in the C standard it's
159 conditionally excluded when __STDC__ is defined.
160
161 2) Due to the U.S. export restrictions, SCO broke the crypt
162 stuff out into a separate library, libcrypt_i.a so the LIBS
163 needed be set to:
164
165 LIBS=' -lsocket -lcrypt_i'
166
Guido van Rossuma3b4b611996-07-21 02:48:16 +0000167 3) According to at least one report, the above apply only to
168 SCO 3 -- Python builds out of the box on SCO 5.
169
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000170SunOS: On SunOS 4.x, when using the native "cc" compiler, you have to
171 disable modules "cmath" and "operator" in Modules/Setup (see
172 the next section) and edit the various Makefiles to add
173 "-DWITHOUT_COMPLEX" to the CFLAGS variable, in order to
174 overcome the limitation to pre-ANSI C. (Or, of course, you
175 could get gcc :-).
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000176
Guido van Rossumcc55c2d1996-10-21 15:14:27 +0000177NeXT: To build fat binaries, use the --with-next-archs switch
178 described below.
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000179
180
181Configuring additional built-in modules
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000182---------------------------------------
Guido van Rossum19e0c261995-01-17 16:36:34 +0000183
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000184You can configure the interpreter to contain fewer or more built-in
185modules by editing the file Modules/Setup. This file is initially
186copied (when the toplevel Makefile makes Modules/Makefile for the
187first time) from Setup.in; if it does not exist yet, make a copy
188yourself. Never edit Setup.in -- always edit Setup. Read the
189comments in the file for information on what kind of edits you can
190make. When you have edited Setup, Makefile and config.c in Modules
191will automatically be rebuilt the next time you run make in the
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000192toplevel directory. (When working inside the Modules directory, use
193"make Makefile; make".)
Guido van Rossum627b2d71993-12-24 10:39:16 +0000194
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000195The default collection of modules should build on any Unix system, but
196many optional modules should work on all modern Unices (e.g. try dbm,
Guido van Rossumd0fe8451996-08-26 03:02:37 +0000197nis, termios, timing, syslog, curses, new, soundex, parser). Often
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000198the quickest way to determine whether a particular module works or not
199is to see if it will build: enable it in Setup, then if you get
200compilation or link errors, disable it -- you're missing support.
201
202On SGI IRIX, there are modules that interface to many SGI specific
203system libraries, e.g. the GL library and the audio hardware.
204
205For SunOS and Solaris, enable module "sunaudiodev" to support the
206audio device.
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000207
208
209Setting the optimization/debugging options
210------------------------------------------
211
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000212If you want or need to change the optimization/debugging options for
213the C compiler, assign to the OPT variable on the toplevel make
214command; e.g. "make OPT=-g" will build a debugging version of Python
215on most platforms. The default is OPT=-O; a value for OPT in the
216environment when the configure script is run overrides this default
217(likewise for CC; and the initial value for LIBS is used as the base
218set of libraries to link with).
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000219
220
221Testing
222-------
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000223
224To test the interpreter that you have just built, type "make test".
225This runs the test set silently, twice (once with no compiled files,
226once with the compiled files left by the previous test run). Each
227test run should print "All tests OK." and nothing more. (The test set
228does not test the built-in modules, but will find most other problems
229with the interpreter.)
230
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000231IMPORTANT: If the tests fail and you decide to mail a bug report,
232*don't* include the output of "make test". It is useless. Run the
233following command instead:
234
Guido van Rossumdfcf35d1996-08-26 17:52:09 +0000235 PYTHONPATH=../Lib:../Lib/test:./Modules ./python -c 'import testall'
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000236
237(substituting the top of the source tree for .. if you built in a
238different directory). This gives the output of the tests and shows
239which test failed.
240
241
242Installing
243----------
244
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000245Installing Python was never this easy!
Guido van Rossum8d7d4ed1996-07-30 21:41:07 +0000246
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000247To install the Python binary, library modules, shared library modules
248(see below), include files, configuration files, and the manual page,
249just type "make install". This will install all platform-independent
250files in subdirectories the directory given with the --prefix option
251to configure or the 'prefix' Make variable (default /usr/local), and
252all binary and other platform-specific files in subdirectories if the
253directory given by --exec-prefix or the 'exec_prefix' Make variable
254(defaults to the --prefix directory). All subdirectories created will
255have Python's version number in their name, e.g. the library modules
256are installed in "/usr/local/lib/python1.4/" by default. The Python
257binary is installed as "python1.4" and a hard link named "python" is
258created. The only file not installed with a version number in its
259name is the manual page, installed as "/usr/local/man/man1/python.1"
260by default.
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000261
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000262If you have a previous installation of a pre-1.4 Python that you don't
263want to replace yet, use "make altinstall". This installs the same
264set of files as "make install" except it doesn't create the hard link
265to "python1.4" named "python" and it doesn't install the manual page
266at all.
267
268The only thing you may have to install manually is the Python mode for
269Emacs. (But then again, more recent versions of Emacs may already
270have it!) This is the file Misc/python-mode.el; follow the
271instructions that came with Emacs for installation of site specific
272files.
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000273
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000274
275Configuration options and variables
276-----------------------------------
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000277
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000278Some special cases are handled by passing options to the configure
279script.
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000280
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000281WARNING: if you rerun the configure script with different options, you
282must run "make clean" before rebuilding. Exceptions to this rule:
283after changing --prefix or --exec-prefix, all you need to do is remove
284Modules/getpath.o; after changing --with-readline, just remove
285Parser/myreadline.o.
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000286
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000287--with(out)-gcc: The configure script uses gcc (the GNU C compiler) if
288 it finds it. If you don't want this, or if this compiler is
289 installed but broken on your platform, pass the option
290 --without-gcc. You can also pass "CC=cc" (or whatever the
291 name of the proper C compiler is) in the environment, but the
292 advantage of using --without-gcc is that this option is
293 remembered by the config.status script for its --recheck
294 option.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000295
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000296--prefix, --exec-prefix: If you want to install the binaries and the
297 Python library somewhere else than in /usr/local/{bin,lib},
298 you can pass the option --prefix=DIRECTORY; the interpreter
299 binary will be installed as DIRECTORY/bin/python and the
300 library files as DIRECTORY/lib/python/*. If you pass
301 --exec-prefix=DIRECTORY (as well) this overrides the
302 installation prefix for architecture-dependent files (like the
303 interpreter binary). Note that --prefix=DIRECTORY also
304 affects the default module search path (sys.path), when
305 Modules/config.c is compiled. Passing make the option
306 prefix=DIRECTORY (and/or exec_prefix=DIRECTORY) overrides the
307 prefix set at configuration time; this may be more convenient
308 than re-running the configure script if you change your mind
309 about the install prefix...
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000310
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000311--with-readline: You can use the GNU readline library to improve the
Guido van Rossumfaf681a1996-06-20 14:32:08 +0000312 interactive user interface. This gives you line editing and
313 command history when calling Python interactively. Unless GNU
314 readline is a standard part of your system (it is on Linux),
315 you need to configure build the GNU readline library before
316 running the configure script. Its sources are not distributed
317 with Python; you can ftp them from any GNU mirror site, or
318 from its home site:
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000319 ftp://slc2.ins.cwru.edu/pub/dist/readline-2.0.tar.gz (or
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000320 a higher version number -- using version 1.x is not
321 recommended).
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000322
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000323 A GPL-free version was posted to comp.sources.misc in volume
324 31 and is widely available from FTP archive sites, e.g.
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000325 ftp://gatekeeper.dec.com/.
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000326
327 Pass the Python configure script the option
328 --with-readline=DIRECTORY where DIRECTORY is the absolute
329 pathname of the directory where you've built the readline
Guido van Rossumfaf681a1996-06-20 14:32:08 +0000330 library. If GNU readline is a standard part of your system,
331 don't pass '=DIRECTORY'. Some hints on building and using the
332 readline library are in the FAQ (file Misc/FAQ).
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000333
Guido van Rossumfaf681a1996-06-20 14:32:08 +0000334--with-thread: On most Unix systems, you can now use multiple threads.
335 To enable this, pass --with-thread. If the library required
336 for threads lives in a peculiar place, you can use
337 --with-thread=DIRECTORY. In the Modules/Setup file, enable
338 the thread module. (Threads aren't enabled automatically
339 because there are run-time penalties when support for them is
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000340 compiled in even if you don't use them.) IMPORTANT: run "make
341 clean" after changing (either enabling or disabling) this
342 option!
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000343
344--with-sgi-dl: On SGI IRIX 4, dynamic loading of extension modules is
345 supported by the "dl" library by Jack Jansen, which is
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000346 ftp'able from ftp://ftp.cwi.nl/pub/dynload/dl-1.6.tar.Z.
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000347 This is enabled (after you've ftp'ed and compiled the dl
348 library!) by passing --with-sgi-dl=DIRECTORY where DIRECTORY
349 is the absolute pathname of the dl library. (Don't bother on
350 IRIX 5, it already has dynamic linking using SunOS style
351 shared libraries.) Support for this feature is deprecated.
352
353--with-dl-dld: Dynamic loading of modules is rumoured to be supported
354 on some other systems: VAX (Ultrix), Sun3 (SunOS 3.4), Sequent
355 Symmetry (Dynix), and Atari ST. This is done using a
356 combination of the GNU dynamic loading package
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000357 (ftp://ftp.cwi.nl/pub/dynload/dl-dld-1.1.tar.Z) and an
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000358 emulation of the SGI dl library mentioned above (the emulation
359 can be found at
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000360 ftp://ftp.cwi.nl/pub/dynload/dld-3.2.3.tar.Z). To
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000361 enable this, ftp and compile both libraries, then call the
362 configure passing it the option
363 --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY where DL_DIRECTORY is
364 the absolute pathname of the dl emulation library and
365 DLD_DIRECTORY is the absolute pathname of the GNU dld library.
366 (Don't bother on SunOS 4 or 5, they already have dynamic
367 linking using shared libraries.) Support for this feature is
368 deprecated.
369
370--with-libm, --with-libc: It is possible to specify alternative
371 versions for the Math library (default -lm) and the C library
372 (default the empty string) using the options
373 --with-libm=STRING and --with-libc=STRING, respectively. E.g.
374 if your system requires that you pass -lc_s to the C compiler
375 to use the shared C library, you can pass --with-libc=-lc_s.
376 These libraries are passed after all other libraries, the C
377 library last.
Guido van Rossum3ff96dd1996-07-30 18:05:04 +0000378
379--with-next-archs='arch1 arch2': Under NEXTSTEP, this will build
380 all compiled binaries with the architectures listed. Includes
381 correctly setting the target architecture specific resource
Guido van Rossumcc55c2d1996-10-21 15:14:27 +0000382 directory. (This option is not supported on other platforms.)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000383
Guido van Rossumd02ba451996-07-31 17:36:01 +0000384--with-libs='libs': Add 'libs' to the LIBS that the python
385 linked against.
386
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000387
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000388Building for multiple architectures (using the VPATH feature)
389-------------------------------------------------------------
390
391If your file system is shared between multiple architectures, it
392usually is not necessary to make copies of the sources for each
393architecture you want to support. If the make program supports the
394VPATH feature, you can create an empty build directory for each
395architecture, and in each directory run the configure script (on the
396appropriate machine with the appropriate options). This creates the
397necessary subdirectories and the Makefiles therein. The Makefiles
398contain a line VPATH=... which points to directory containing the
Guido van Rossumd0fe8451996-08-26 03:02:37 +0000399actual sources. (On SGI systems, use "smake -J1" instead of "make" if
400you use VPATH -- don't try gnumake.)
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000401
402For example, the following is all you need to build a minimal Python
403in /usr/tmp/python (assuming ~guido/src/python is the toplevel
404directory and you want to build in /usr/tmp/python):
405
406 $ mkdir /usr/tmp/python
407 $ cd /usr/tmp/python
408 $ ~guido/src/python/configure
409 [...]
410 $ make
411 [...]
412 $
413
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000414Note that Modules/Makefile copies the original Setup file to the build
415directory if it finds no Setup file there. This means that you can
416edit the Setup file for each architecture independently. For this
417reason, subsequent changes to the original Setup file are not tracked
418automatically, as they might overwrite local changes. To force a copy
419of a changed original Setup file, delete the target Setup file. (The
420makesetup script supports multiple input files, so if you want to be
421fancy you can change the rules to create an empty Setup.local if it
422doesn't exist and run it with arguments $(srcdir)/Setup Setup.local;
423however this assumes that you only need to add modules.)
424
425
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000426Building on non-UNIX systems
427----------------------------
428
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000429Building Python for a PC is now a piece of cake!
Guido van Rossum8d7d4ed1996-07-30 21:41:07 +0000430
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000431Enter the directory "PC" and read the file "readme.txt". Most popular
432non-Unix PC platforms and compilers are supported (Unix ports to the
433PC such as Linux, FreeBSD or Solaris-x86 of course use the standard
434Unix build instructions).
435
436For the Mac, a separate source distribution will be made available,
437for use with the CodeWarrior compiler. If you are interested in Mac
438development, join the PythonMac Special Interest Group
439(http://www.python.org/sigs/pythonmac-sig/, or send email to
440pythonmac-sig-request@python.org).
441
442Of course, there are also binary distributions available for these
443platforms -- see http://www.python.org/python/.
444
445To port Python to a new non-UNIX system, you will have to fake the
446effect of running the configure script manually (for Mac and PC, this
447has already been done for you). A good start is to copy the file
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000448config.h.in to config.h and edit the latter to reflect the actual
449configuration of your system. Most symbols must simply be defined as
4501 only if the corresponding feature is present and can be left alone
451otherwise; however RETSIGTYPE must always be defined, either as int or
452as void, and the *_t type symbols must be defined as some variant of
Guido van Rossumd0fe8451996-08-26 03:02:37 +0000453int if they need to be defined at all.
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000454
455
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000456
457Miscellaneous issues
458====================
459
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000460Documentation
461-------------
462
463All documentation is provided in the subdirectory Doc in the form of
464LaTeX files. In order of importance for new users: Tutorial (tut),
465Library Reference (lib), Language Reference (ref), Extending (ext).
466Especially the Library Reference is of immense value since much of
467Python's power (including the built-in data types and functions!) is
468described here.
469
Guido van Rossumdfcf35d1996-08-26 17:52:09 +0000470To print the documentation from the LaTeX files, chdir into the Doc
471subdirectory, type "make" (let's hope you have LaTeX installed!), and
472send the four resulting PostScript files (tut.ps, lib.ps, ref.ps, and
473ext.ps) to the printer. See the README file there. If you don't have
474LaTeX, you can ftp the PostScript files from the ftp archives (see
475below).
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000476
Guido van Rossumdfcf35d1996-08-26 17:52:09 +0000477All documentation is also available on-line via the Python web site
478(http://www.python.org/, see below). It can also be downloaded
479separately from the ftp archives (see below) in Emacs INFO, HTML or
480PostScript form -- see the web site or the FAQ (file Misc/FAQ) for
481more info.
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000482
483
484Emacs mode
485----------
486
Guido van Rossumd0fe8451996-08-26 03:02:37 +0000487There's an excellent Emacs editing mode for Python code; see the file
488Misc/python-mode.el. Originally written by Tim Peters, it is now
489maintained by Barry Warsaw <bwarsaw@cnri.reston.va.us>.
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000490
491
Guido van Rossum8d7d4ed1996-07-30 21:41:07 +0000492Web site
493--------
494
495Python's own web site has URL http://www.python.org/. Come visit us!
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000496There are a number of mirrors, listed on the home page -- try a mirror
497that's close you you.
Guido van Rossum8d7d4ed1996-07-30 21:41:07 +0000498
499
Guido van Rossumd0fe8451996-08-26 03:02:37 +0000500Ftp site
501--------
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000502
Guido van Rossum8d7d4ed1996-07-30 21:41:07 +0000503Python's own ftp site is ftp.python.org, directory /pub/python. See
504the FAQ (file Misc/FAQ) for a list of other ftp sites carrying the
Guido van Rossumfaf681a1996-06-20 14:32:08 +0000505Python distribution.
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000506
507
508Newsgroup and mailing list
509--------------------------
510
Guido van Rossumdfcf35d1996-08-26 17:52:09 +0000511There are a newsgroup and a mailing list devoted to Python. The
512newsgroup, comp.lang.python, contains exactly the same messages as the
513mailing list (though not always in the same order, due to the
514mysterious nature of the Usenet news distribution algorithm). To
515subscribe to the mailing list, send mail containing your real name and
516e-mail address to "python-list-request@cwi.nl". Use the same address
517if you want to unsibscribed. (A real person reads these messages, so
518no LISTPROC or Majordomo commands, please, and please be patient --
519normal turn-around time is about one working day.)
Guido van Rossumd0fe8451996-08-26 03:02:37 +0000520
Guido van Rossumdfcf35d1996-08-26 17:52:09 +0000521The Python web site contains a search form that lets you search the
522newsgroup archives (or the web site itself). Click on the "search"
523link in the banner menu on any page of http://www.python.org/.
Guido van Rossumd0fe8451996-08-26 03:02:37 +0000524
525
526Bug reports
527-----------
528
Guido van Rossumdfcf35d1996-08-26 17:52:09 +0000529Bugs are best reported to the comp.lang.python newsgroup or the Python
Guido van Rossumcc55c2d1996-10-21 15:14:27 +0000530mailing list -- see the section "Newsgroup and mailing list" above.
Guido van Rossumdfcf35d1996-08-26 17:52:09 +0000531Before posting, check the newsgroup archives (see above) to see if
532your bug has already been reported! If you specifically don't want to
533involve the newsgroup or mailing list, send them to
534python-bugs@python.org.
Guido van Rossumd0fe8451996-08-26 03:02:37 +0000535
536
537Questions
538---------
539
540For help, if you can't find it in the manuals, the FAQ or on the web
541site, it's best to post to the comp.lang.python or the Python mailing
542list (see above). If you specifically don't want to involve the
543newsgroup or mailing list, send questions to python-help@python.org.
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000544
545
546The Tk interface
547----------------
548
549Tk (the user interface component of John Ousterhout's Tcl language) is
550also usable from Python. Since this requires that you first build and
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000551install Tcl/Tk, the Tk interface is not enabled by default. It works
552with Tcl 7.5 and Tk 4.1 as well as with Tcl 7.4 and Tk 4.0.
553
554See http://www.smli.com/research/tcl/ for more info on where to get
555Tcl/Tk.
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000556
557To enable the Python/Tk interface, once you've built and installed
558Tcl/Tk, all you need to do is edit two lines in Modules/Setup; search
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000559for the string "_tkinter". Uncomment one (normally the first) of the
560lines beginning with "#_tkinter" and un-comment the line beginning
561with "#TKPATH". If you have installed Tcl/Tk or X11 in unusual
562places, you will have to edit the first line to fix or add -I and -L
563options. See the Build Instructions above for more details.
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000564
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000565There is little documentation on how to use Tkinter; however most of
566the Tk manual pages apply quite straightforwardly. Begin with
567fetching the "Tk Lifesaver" document,
568e.g. ftp://ftp.python.org/pub/python/doc/tkinter-doc.tar.gz (a gzipped
569tar file containing a PostScript file) or the on-line version
570http://www.python.org/doc/life-preserver/index.html. Reading the
571Tkinter.py source will reveal most details on how Tkinter calls are
572translated into Tcl code.
573
574There are demos in the Demo/tkinter directory, in the subdirectories
575guido, matt and www (the matt and guido subdirectories have been
576overhauled to use more recent Tkinter coding conventions).
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000577
578Note that there's a Python module called "Tkinter" (capital T) which
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000579lives in Lib/tkinter/Tkinter.py, and a C module called "_tkinter"
580(lower case t and leading underscore) which lives in
581Modules/_tkinter.c. Demos and normal Tk applications only import the
582Python Tkinter module -- only the latter uses the C _tkinter module
583directly. In order to find the C _tkinter module, it must be compiled
584and linked into the Python interpreter -- the _tkinter line in the
585Setup file does this. In order to find the Python Tkinter module,
586sys.path must be set correctly -- the TKPATH assignment in the Setup
587file takes care of this, but only if you install Python properly
588("make install libinstall"). (You can also use dynamic loading for
589the C _tkinter module, in which case you must manually fix up sys.path
590or set $PYTHONPATH for the Python Tkinter module.)
Guido van Rossum84c8c7f1995-08-28 02:44:24 +0000591
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000592
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000593Distribution structure
594----------------------
595
596Most subdirectories have their own README file. Most files have
597comments.
598
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000599BUGS A list of known bugs (not completely up-to-date)
600TODO A list of things that could be done (not up-to-date)
601Demo/ Demonstration scripts, modules and programs
602Doc/ Documentation (LaTeX sources)
603Grammar/ Input for the parser generator
604Include/ Public header files
605Lib/ Python library modules
606Makefile.in Source from which config.status creates Makefile
607Misc/ Miscellaneous files
608Modules/ Implementation of most built-in modules
609Objects/ Implementation of most built-in object types
610Parser/ The parser and tokenizer and their input handling
611Python/ The "compiler" and interpreter
612README The file you're reading now
613Tools/ Some useful programs written in Python
614acconfig.h Additional input for the autoheader program
615config.h.in Source from which config.status creates config.h
616configure Configuration shell script (GNU autoconf output)
617configure.in Configuration specification (GNU autoconf input)
618install-sh Shell script used to install files
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000619
620The following files will (may) be created in the toplevel directory by
621the configuration and build processes:
622
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000623Makefile Build rules
624config.cache cache of configuration variables
625config.h Configuration header
626config.log log from last configure run
627config.status status from last run of configure script
628python The executable interpreter
629tags, TAGS Tags files for vi and Emacs
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000630
631
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000632Author's address
Guido van Rossumd0fe8451996-08-26 03:02:37 +0000633================
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000634
635Guido van Rossum
Guido van Rossumfaf681a1996-06-20 14:32:08 +0000636CNRI
6371895 Preston White Drive
Guido van Rossum8d7d4ed1996-07-30 21:41:07 +0000638Reston, VA 20191
Guido van Rossumfaf681a1996-06-20 14:32:08 +0000639USA
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000640
Guido van Rossumd0fe8451996-08-26 03:02:37 +0000641E-mail: guido@cnri.reston.va.us or guido@python.org
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000642
643
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000644
645Copyright notice
646================
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000647
648The Python source is copyrighted, but you can freely use and copy it
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000649as long as you don't change or remove the copyright notice:
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000650
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000651----------------------------------------------------------------------
Guido van Rossumaf5b83e1995-01-04 19:02:35 +0000652Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
653The Netherlands.
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000654
655 All Rights Reserved
656
Guido van Rossumc561e5d1994-08-23 13:52:46 +0000657Permission to use, copy, modify, and distribute this software and its
658documentation for any purpose and without fee is hereby granted,
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000659provided that the above copyright notice appear in all copies and that
Guido van Rossumc561e5d1994-08-23 13:52:46 +0000660both that copyright notice and this permission notice appear in
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000661supporting documentation, and that the names of Stichting Mathematisch
662Centrum or CWI not be used in advertising or publicity pertaining to
663distribution of the software without specific, written prior permission.
664
665STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
666THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
667FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
668FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
669WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
670ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
671OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000672----------------------------------------------------------------------
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000673
674
Guido van Rossumfaf681a1996-06-20 14:32:08 +0000675--Guido van Rossum (home page: http://www.python.org/~guido/)