blob: 6deba91825fb013ec95783ce0aa840fb49c1480b [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
11I really expect this to be the last beta release. I declare a "feature
12freeze" until 1.4 final is released. Changes in 1.4 final will be
13restricted to urgent bugfixes, portability enhancements, and added
14documentation 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 Rossumd0fe8451996-08-26 03:02:37 +000020A list of (nearly) all things that changed in each of the 1.4 beta releases
21can be found in the file Misc/NEWS -- together this comprises a list of
22everything 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.
31If you have web access, point your browser to
32http://www.python.org.
Guido van Rossum91cb9d21995-04-10 11:47:38 +000033
34
35If you don't read instructions
36------------------------------
37
38Congratulations on getting this far. :-)
39
40To start building right away (on UNIX): type "./configure" in the
41current directory and when it finishes, type "make". The section
42Build Instructions below is still recommended reading. :-)
43
44
45Copyright issues
46----------------
47
48Python is COPYRIGHTED but free to use for all. See the full copyright
49notice at the end of this file.
50
51The Python distribution is *not* affected by the GNU Public Licence
52(GPL). There are interfaces to some GNU code but these are entirely
53optional and no GNU code is distributed with Python. For all these
54packages, GPL-free public domain versions also exist.
55
Guido van Rossum627b2d71993-12-24 10:39:16 +000056
Guido van Rossum6d9cc801996-08-01 17:31:22 +000057
Guido van Rossumff840491995-09-18 22:02:47 +000058A modest plug
59=============
60
Guido van Rossum0447a321995-10-08 01:22:33 +000061*************************************************************************
Guido van Rossum3ff96dd1996-07-30 18:05:04 +000062* *
Guido van Rossum8d7d4ed1996-07-30 21:41:07 +000063* If you use Python, please consider joining the Python Software *
64* Activity (PSA). See http://www.python.org/psa/. *
65* *
Guido van Rossumd0fe8451996-08-26 03:02:37 +000066* Organizations that make heavy use of Python are especially *
67* encouraged to become corporate members! *
Guido van Rossum3ff96dd1996-07-30 18:05:04 +000068* *
Guido van Rossum0447a321995-10-08 01:22:33 +000069*************************************************************************
Guido van Rossumff840491995-09-18 22:02:47 +000070
Guido van Rossum627b2d71993-12-24 10:39:16 +000071
Guido van Rossum6d9cc801996-08-01 17:31:22 +000072
Guido van Rossum433c8ad1994-08-01 12:07:07 +000073Build instructions
Guido van Rossum91cb9d21995-04-10 11:47:38 +000074==================
Guido van Rossum627b2d71993-12-24 10:39:16 +000075
Guido van Rossum6d9cc801996-08-01 17:31:22 +000076Before you can build Python, you must first configure it.
77Fortunately, the configuration and build process has been streamlined
78for most Unix installations, so all you have to do is type a few
79commands, optionally edit one file, and sit back. There are some
80platforms where things are not quite as smooth; see the platform
81specific notes below. If you want to build for multiple platforms
82sharing the same source tree, see the section on VPATH below.
Guido van Rossum627b2d71993-12-24 10:39:16 +000083
Guido van Rossum6d9cc801996-08-01 17:31:22 +000084You start by running the script "./configure", which figures out your
85system configuration and creates several Makefiles. (It takes a
86minute or two -- please be patient!) When it's done, you are ready to
87run make. You may want to pass options to the configure script -- see
88the section below on configuration options and variables.
89
90To build Python, you normally type "make" in the toplevel directory.
91This will recursively run make in each of the subdirectories Parser,
92Objects, Python and Modules, creating a library file in each one. The
93executable of the interpreter is built in the Modules subdirectory and
94moved up here when it is built. If you want or need to, you can also
95chdir into each subdirectory in turn and run make there manually (do
96the Modules subdirectory last!).
97
98Once you have built an interpreter, see the subsections below on
99testing, configuring additional modules, and installation. If you run
100in trouble, see the next section.
Guido van Rossum627b2d71993-12-24 10:39:16 +0000101
Guido van Rossum0a516c91994-09-12 10:58:40 +0000102
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000103Troubleshooting
104---------------
Guido van Rossum627b2d71993-12-24 10:39:16 +0000105
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000106See also the platform specific notes in the next section.
107
Guido van Rossumfaf681a1996-06-20 14:32:08 +0000108If recursive makes fail, try invoking make as "make MAKE=make".
109
110If you run into other trouble, see section 3 of the FAQ (file
111Misc/FAQ) for hints on what can go wrong, and how to fix it.
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000112
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000113If you rerun the configure script with different options, remove all
114object files by running "make clean" before rebuilding. Believe it or
115not, "make clean" sometimes helps to clean up other inexplicable
116problems as well. Try it before sending in a bug report!
117
Guido van Rossumd0fe8451996-08-26 03:02:37 +0000118If the configure script fails or doesn't seem to find things that
119should be there, inspect the config.log file.
120
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000121
122Platform specific notes
123-----------------------
124
Guido van Rossum0447a321995-10-08 01:22:33 +0000125(Some of these may no longer apply. If you find you can build Python
126on these platforms without the special directions mentioned here, let
127me know so I can remove them!)
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000128
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000129Linux: On Linux version 1.x, once you've built Python, use it to run
130 the regen script in the Lib/linux1 directory. Apparently
131 the files as distributed don't match the system headers on
132 some Linux versions. (The "h2py" command refers to
133 Tools/scripts/h2py.py.) The modules distributed for Linux 2.x
Guido van Rossumd0fe8451996-08-26 03:02:37 +0000134 should be okay. Shared library support now works by default
135 on ELF-based x86 Linux systems.
Guido van Rossum8eca2c21996-02-14 18:37:46 +0000136
Guido van Rossumd0fe8451996-08-26 03:02:37 +0000137AIX: A complete overhaul of the shared library support is now in
138 place. To enable it, uncomment the LINKCC line in the Setup
139 file. See Misc/AIX-NOTES for some notes on how it's done.
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000140
Guido van Rossumd0fe8451996-08-26 03:02:37 +0000141 WARNING! In some versions of AIX 3.x, you get errors about
Guido van Rossuma3b4b611996-07-21 02:48:16 +0000142 Invalid Indent when running the Python test set. This appears
143 to be a bug in the AIX compiler. Rebuild Parser/tokenizer.c
144 using OPT="" or OPT=-g, or use gcc.
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000145
Guido van Rossumd0fe8451996-08-26 03:02:37 +0000146HP-UX: Shared library support now works by default (at least on HP-UX
147 9.x). One other problem remains: the HP ANSI C compiler (cc
148 -Aa) is too pedantic to use, but in K&R mode, it barfs on a
149 few files (complexobject.c, getargs.c and operator.c). Until
150 this is fixed, the following seems to work:
151
152 make -k # this compiles all but a few files
153 make OPT=-Aa # compile the remaining files
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000154
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000155Minix: When using ack, use "CC=cc AR=aal RANLIB=: ./configure"!
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000156
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000157SCO: 1) Everything works much better if you add -U__STDC__ to the
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000158 defs. This is because all the SCO header files are broken.
159 Anything that isn't mentioned in the C standard it's
160 conditionally excluded when __STDC__ is defined.
161
162 2) Due to the U.S. export restrictions, SCO broke the crypt
163 stuff out into a separate library, libcrypt_i.a so the LIBS
164 needed be set to:
165
166 LIBS=' -lsocket -lcrypt_i'
167
Guido van Rossuma3b4b611996-07-21 02:48:16 +0000168 3) According to at least one report, the above apply only to
169 SCO 3 -- Python builds out of the box on SCO 5.
170
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000171SunOS: On SunOS 4.x, when using the native "cc" compiler, you have to
172 disable modules "cmath" and "operator" in Modules/Setup (see
173 the next section) and edit the various Makefiles to add
174 "-DWITHOUT_COMPLEX" to the CFLAGS variable, in order to
175 overcome the limitation to pre-ANSI C. (Or, of course, you
176 could get gcc :-).
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000177
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000178NeXT: Some more changes are in the works, but were submitted too
179 late to make it to beta2. You may want to remove "-Wall" from
180 the OPT variable, for instance, unless you are a masochist.
181
182
183Configuring additional built-in modules
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000184---------------------------------------
Guido van Rossum19e0c261995-01-17 16:36:34 +0000185
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000186You can configure the interpreter to contain fewer or more built-in
187modules by editing the file Modules/Setup. This file is initially
188copied (when the toplevel Makefile makes Modules/Makefile for the
189first time) from Setup.in; if it does not exist yet, make a copy
190yourself. Never edit Setup.in -- always edit Setup. Read the
191comments in the file for information on what kind of edits you can
192make. When you have edited Setup, Makefile and config.c in Modules
193will automatically be rebuilt the next time you run make in the
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000194toplevel directory. (When working inside the Modules directory, use
195"make Makefile; make".)
Guido van Rossum627b2d71993-12-24 10:39:16 +0000196
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000197The default collection of modules should build on any Unix system, but
198many optional modules should work on all modern Unices (e.g. try dbm,
Guido van Rossumd0fe8451996-08-26 03:02:37 +0000199nis, termios, timing, syslog, curses, new, soundex, parser). Often
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000200the quickest way to determine whether a particular module works or not
201is to see if it will build: enable it in Setup, then if you get
202compilation or link errors, disable it -- you're missing support.
203
204On SGI IRIX, there are modules that interface to many SGI specific
205system libraries, e.g. the GL library and the audio hardware.
206
207For SunOS and Solaris, enable module "sunaudiodev" to support the
208audio device.
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000209
210
211Setting the optimization/debugging options
212------------------------------------------
213
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000214If you want or need to change the optimization/debugging options for
215the C compiler, assign to the OPT variable on the toplevel make
216command; e.g. "make OPT=-g" will build a debugging version of Python
217on most platforms. The default is OPT=-O; a value for OPT in the
218environment when the configure script is run overrides this default
219(likewise for CC; and the initial value for LIBS is used as the base
220set of libraries to link with).
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000221
222
223Testing
224-------
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000225
226To test the interpreter that you have just built, type "make test".
227This runs the test set silently, twice (once with no compiled files,
228once with the compiled files left by the previous test run). Each
229test run should print "All tests OK." and nothing more. (The test set
230does not test the built-in modules, but will find most other problems
231with the interpreter.)
232
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000233IMPORTANT: If the tests fail and you decide to mail a bug report,
234*don't* include the output of "make test". It is useless. Run the
235following command instead:
236
237 PYTHONPATH=../Lib:../Lib/test:./Modules ./python -c 'import testall'
238
239(substituting the top of the source tree for .. if you built in a
240different directory). This gives the output of the tests and shows
241which test failed.
242
243
244Installing
245----------
246
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000247Installing Python was never this easy!
Guido van Rossum8d7d4ed1996-07-30 21:41:07 +0000248
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000249To install the Python binary, library modules, shared library modules
250(see below), include files, configuration files, and the manual page,
251just type "make install". This will install all platform-independent
252files in subdirectories the directory given with the --prefix option
253to configure or the 'prefix' Make variable (default /usr/local), and
254all binary and other platform-specific files in subdirectories if the
255directory given by --exec-prefix or the 'exec_prefix' Make variable
256(defaults to the --prefix directory). All subdirectories created will
257have Python's version number in their name, e.g. the library modules
258are installed in "/usr/local/lib/python1.4/" by default. The Python
259binary is installed as "python1.4" and a hard link named "python" is
260created. The only file not installed with a version number in its
261name is the manual page, installed as "/usr/local/man/man1/python.1"
262by default.
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000263
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000264If you have a previous installation of a pre-1.4 Python that you don't
265want to replace yet, use "make altinstall". This installs the same
266set of files as "make install" except it doesn't create the hard link
267to "python1.4" named "python" and it doesn't install the manual page
268at all.
269
270The only thing you may have to install manually is the Python mode for
271Emacs. (But then again, more recent versions of Emacs may already
272have it!) This is the file Misc/python-mode.el; follow the
273instructions that came with Emacs for installation of site specific
274files.
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000275
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000276
277Configuration options and variables
278-----------------------------------
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000279
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000280Some special cases are handled by passing options to the configure
281script.
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000282
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000283WARNING: if you rerun the configure script with different options, you
284must run "make clean" before rebuilding. Exceptions to this rule:
285after changing --prefix or --exec-prefix, all you need to do is remove
286Modules/getpath.o; after changing --with-readline, just remove
287Parser/myreadline.o.
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000288
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000289--with(out)-gcc: The configure script uses gcc (the GNU C compiler) if
290 it finds it. If you don't want this, or if this compiler is
291 installed but broken on your platform, pass the option
292 --without-gcc. You can also pass "CC=cc" (or whatever the
293 name of the proper C compiler is) in the environment, but the
294 advantage of using --without-gcc is that this option is
295 remembered by the config.status script for its --recheck
296 option.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000297
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000298--prefix, --exec-prefix: If you want to install the binaries and the
299 Python library somewhere else than in /usr/local/{bin,lib},
300 you can pass the option --prefix=DIRECTORY; the interpreter
301 binary will be installed as DIRECTORY/bin/python and the
302 library files as DIRECTORY/lib/python/*. If you pass
303 --exec-prefix=DIRECTORY (as well) this overrides the
304 installation prefix for architecture-dependent files (like the
305 interpreter binary). Note that --prefix=DIRECTORY also
306 affects the default module search path (sys.path), when
307 Modules/config.c is compiled. Passing make the option
308 prefix=DIRECTORY (and/or exec_prefix=DIRECTORY) overrides the
309 prefix set at configuration time; this may be more convenient
310 than re-running the configure script if you change your mind
311 about the install prefix...
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000312
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000313--with-readline: You can use the GNU readline library to improve the
Guido van Rossumfaf681a1996-06-20 14:32:08 +0000314 interactive user interface. This gives you line editing and
315 command history when calling Python interactively. Unless GNU
316 readline is a standard part of your system (it is on Linux),
317 you need to configure build the GNU readline library before
318 running the configure script. Its sources are not distributed
319 with Python; you can ftp them from any GNU mirror site, or
320 from its home site:
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000321 ftp://slc2.ins.cwru.edu/pub/dist/readline-2.0.tar.gz (or
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000322 a higher version number -- using version 1.x is not
323 recommended).
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000324
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000325 A GPL-free version was posted to comp.sources.misc in volume
326 31 and is widely available from FTP archive sites, e.g.
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000327 ftp://gatekeeper.dec.com/.
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000328
329 Pass the Python configure script the option
330 --with-readline=DIRECTORY where DIRECTORY is the absolute
331 pathname of the directory where you've built the readline
Guido van Rossumfaf681a1996-06-20 14:32:08 +0000332 library. If GNU readline is a standard part of your system,
333 don't pass '=DIRECTORY'. Some hints on building and using the
334 readline library are in the FAQ (file Misc/FAQ).
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000335
Guido van Rossumfaf681a1996-06-20 14:32:08 +0000336--with-thread: On most Unix systems, you can now use multiple threads.
337 To enable this, pass --with-thread. If the library required
338 for threads lives in a peculiar place, you can use
339 --with-thread=DIRECTORY. In the Modules/Setup file, enable
340 the thread module. (Threads aren't enabled automatically
341 because there are run-time penalties when support for them is
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000342 compiled in even if you don't use them.) IMPORTANT: run "make
343 clean" after changing (either enabling or disabling) this
344 option!
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000345
346--with-sgi-dl: On SGI IRIX 4, dynamic loading of extension modules is
347 supported by the "dl" library by Jack Jansen, which is
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000348 ftp'able from ftp://ftp.cwi.nl/pub/dynload/dl-1.6.tar.Z.
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000349 This is enabled (after you've ftp'ed and compiled the dl
350 library!) by passing --with-sgi-dl=DIRECTORY where DIRECTORY
351 is the absolute pathname of the dl library. (Don't bother on
352 IRIX 5, it already has dynamic linking using SunOS style
353 shared libraries.) Support for this feature is deprecated.
354
355--with-dl-dld: Dynamic loading of modules is rumoured to be supported
356 on some other systems: VAX (Ultrix), Sun3 (SunOS 3.4), Sequent
357 Symmetry (Dynix), and Atari ST. This is done using a
358 combination of the GNU dynamic loading package
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000359 (ftp://ftp.cwi.nl/pub/dynload/dl-dld-1.1.tar.Z) and an
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000360 emulation of the SGI dl library mentioned above (the emulation
361 can be found at
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000362 ftp://ftp.cwi.nl/pub/dynload/dld-3.2.3.tar.Z). To
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000363 enable this, ftp and compile both libraries, then call the
364 configure passing it the option
365 --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY where DL_DIRECTORY is
366 the absolute pathname of the dl emulation library and
367 DLD_DIRECTORY is the absolute pathname of the GNU dld library.
368 (Don't bother on SunOS 4 or 5, they already have dynamic
369 linking using shared libraries.) Support for this feature is
370 deprecated.
371
372--with-libm, --with-libc: It is possible to specify alternative
373 versions for the Math library (default -lm) and the C library
374 (default the empty string) using the options
375 --with-libm=STRING and --with-libc=STRING, respectively. E.g.
376 if your system requires that you pass -lc_s to the C compiler
377 to use the shared C library, you can pass --with-libc=-lc_s.
378 These libraries are passed after all other libraries, the C
379 library last.
Guido van Rossum3ff96dd1996-07-30 18:05:04 +0000380
381--with-next-archs='arch1 arch2': Under NEXTSTEP, this will build
382 all compiled binaries with the architectures listed. Includes
383 correctly setting the target architecture specific resource
384 directory.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000385
Guido van Rossumd02ba451996-07-31 17:36:01 +0000386--with-libs='libs': Add 'libs' to the LIBS that the python
387 linked against.
388
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000389
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000390Building for multiple architectures (using the VPATH feature)
391-------------------------------------------------------------
392
393If your file system is shared between multiple architectures, it
394usually is not necessary to make copies of the sources for each
395architecture you want to support. If the make program supports the
396VPATH feature, you can create an empty build directory for each
397architecture, and in each directory run the configure script (on the
398appropriate machine with the appropriate options). This creates the
399necessary subdirectories and the Makefiles therein. The Makefiles
400contain a line VPATH=... which points to directory containing the
Guido van Rossumd0fe8451996-08-26 03:02:37 +0000401actual sources. (On SGI systems, use "smake -J1" instead of "make" if
402you use VPATH -- don't try gnumake.)
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000403
404For example, the following is all you need to build a minimal Python
405in /usr/tmp/python (assuming ~guido/src/python is the toplevel
406directory and you want to build in /usr/tmp/python):
407
408 $ mkdir /usr/tmp/python
409 $ cd /usr/tmp/python
410 $ ~guido/src/python/configure
411 [...]
412 $ make
413 [...]
414 $
415
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000416Note that Modules/Makefile copies the original Setup file to the build
417directory if it finds no Setup file there. This means that you can
418edit the Setup file for each architecture independently. For this
419reason, subsequent changes to the original Setup file are not tracked
420automatically, as they might overwrite local changes. To force a copy
421of a changed original Setup file, delete the target Setup file. (The
422makesetup script supports multiple input files, so if you want to be
423fancy you can change the rules to create an empty Setup.local if it
424doesn't exist and run it with arguments $(srcdir)/Setup Setup.local;
425however this assumes that you only need to add modules.)
426
427
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000428Building on non-UNIX systems
429----------------------------
430
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000431Building Python for a PC is now a piece of cake!
Guido van Rossum8d7d4ed1996-07-30 21:41:07 +0000432
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000433Enter the directory "PC" and read the file "readme.txt". Most popular
434non-Unix PC platforms and compilers are supported (Unix ports to the
435PC such as Linux, FreeBSD or Solaris-x86 of course use the standard
436Unix build instructions).
437
438For the Mac, a separate source distribution will be made available,
439for use with the CodeWarrior compiler. If you are interested in Mac
440development, join the PythonMac Special Interest Group
441(http://www.python.org/sigs/pythonmac-sig/, or send email to
442pythonmac-sig-request@python.org).
443
444Of course, there are also binary distributions available for these
445platforms -- see http://www.python.org/python/.
446
447To port Python to a new non-UNIX system, you will have to fake the
448effect of running the configure script manually (for Mac and PC, this
449has already been done for you). A good start is to copy the file
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000450config.h.in to config.h and edit the latter to reflect the actual
451configuration of your system. Most symbols must simply be defined as
4521 only if the corresponding feature is present and can be left alone
453otherwise; however RETSIGTYPE must always be defined, either as int or
454as void, and the *_t type symbols must be defined as some variant of
Guido van Rossumd0fe8451996-08-26 03:02:37 +0000455int if they need to be defined at all.
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000456
457
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000458
459Miscellaneous issues
460====================
461
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000462Documentation
463-------------
464
465All documentation is provided in the subdirectory Doc in the form of
466LaTeX files. In order of importance for new users: Tutorial (tut),
467Library Reference (lib), Language Reference (ref), Extending (ext).
468Especially the Library Reference is of immense value since much of
469Python's power (including the built-in data types and functions!) is
470described here.
471
Guido van Rossumd0fe8451996-08-26 03:02:37 +0000472To print the documentation from the LaTeX files, chdir into the Doc
473subdirectory, type "make" (let's hope you have LaTeX installed!), and send
474the four resulting PostScript files (tut.ps, lib.ps, ref.ps, and ext.ps) to
475the printer. See the README file there. If you don't have LaTeX, you can
476ftp the PostScript files from the ftp archives (see below).
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000477
Guido van Rossumd0fe8451996-08-26 03:02:37 +0000478All documentation is also available on-line via the Python web site
479(http://www.python.org/, see below). It can also be downloaded separately
480from the ftp archives (see below) in Emacs INFO, HTML or PostScript form --
481see the web site or the FAQ (file Misc/FAQ) for more 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 Rossumd0fe8451996-08-26 03:02:37 +0000511There are a newsgroup and a mailing list devoted to Python. The newsgroup,
512comp.lang.python, contains exactly the same messages as the mailing list
513(though not always in the same order, due to the mysterious nature of the
514Usenet news distribution algorithm). To subscribe to the mailing list,
515send mail containing your real name and e-mail address to
516"python-list-request@cwi.nl". Use the same address if you want to
517unsibscribed. (A real person reads these messages, so no LISTPROC or
518Majordomo commands, please, and please be patient -- normal turn-around
519time is about one working day.)
520
521The Python web site contains a search form that lets you search the
522newsgroup archives (or the web site itself). Click on the "search" link
523in the banner menu on any page of http://www.python.org/.
524
525
526Bug reports
527-----------
528
529Bugs are best reported to the comp.lang.python newsgroup or the Python
530mailing list -- see the section "Newsgroup and mailing list" below. Before
531posting, check the newsgroup archives (see above) to see if your bug has
532already been reported! If you specifically don't want to involve the
533newsgroup or mailing list, send them to python-bugs@python.org.
534
535
536Questions
537---------
538
539For help, if you can't find it in the manuals, the FAQ or on the web
540site, it's best to post to the comp.lang.python or the Python mailing
541list (see above). If you specifically don't want to involve the
542newsgroup or mailing list, send questions to python-help@python.org.
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000543
544
545The Tk interface
546----------------
547
548Tk (the user interface component of John Ousterhout's Tcl language) is
549also usable from Python. Since this requires that you first build and
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000550install Tcl/Tk, the Tk interface is not enabled by default. It works
551with Tcl 7.5 and Tk 4.1 as well as with Tcl 7.4 and Tk 4.0.
552
553See http://www.smli.com/research/tcl/ for more info on where to get
554Tcl/Tk.
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000555
556To enable the Python/Tk interface, once you've built and installed
557Tcl/Tk, all you need to do is edit two lines in Modules/Setup; search
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000558for the string "_tkinter". Uncomment one (normally the first) of the
559lines beginning with "#_tkinter" and un-comment the line beginning
560with "#TKPATH". If you have installed Tcl/Tk or X11 in unusual
561places, you will have to edit the first line to fix or add -I and -L
562options. See the Build Instructions above for more details.
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000563
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000564There is little documentation on how to use Tkinter; however most of
565the Tk manual pages apply quite straightforwardly. Begin with
566fetching the "Tk Lifesaver" document,
567e.g. ftp://ftp.python.org/pub/python/doc/tkinter-doc.tar.gz (a gzipped
568tar file containing a PostScript file) or the on-line version
569http://www.python.org/doc/life-preserver/index.html. Reading the
570Tkinter.py source will reveal most details on how Tkinter calls are
571translated into Tcl code.
572
573There are demos in the Demo/tkinter directory, in the subdirectories
574guido, matt and www (the matt and guido subdirectories have been
575overhauled to use more recent Tkinter coding conventions).
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000576
577Note that there's a Python module called "Tkinter" (capital T) which
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000578lives in Lib/tkinter/Tkinter.py, and a C module called "_tkinter"
579(lower case t and leading underscore) which lives in
580Modules/_tkinter.c. Demos and normal Tk applications only import the
581Python Tkinter module -- only the latter uses the C _tkinter module
582directly. In order to find the C _tkinter module, it must be compiled
583and linked into the Python interpreter -- the _tkinter line in the
584Setup file does this. In order to find the Python Tkinter module,
585sys.path must be set correctly -- the TKPATH assignment in the Setup
586file takes care of this, but only if you install Python properly
587("make install libinstall"). (You can also use dynamic loading for
588the C _tkinter module, in which case you must manually fix up sys.path
589or set $PYTHONPATH for the Python Tkinter module.)
Guido van Rossum84c8c7f1995-08-28 02:44:24 +0000590
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000591
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000592Distribution structure
593----------------------
594
595Most subdirectories have their own README file. Most files have
596comments.
597
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000598BUGS A list of known bugs (not completely up-to-date)
599TODO A list of things that could be done (not up-to-date)
600Demo/ Demonstration scripts, modules and programs
601Doc/ Documentation (LaTeX sources)
602Grammar/ Input for the parser generator
603Include/ Public header files
604Lib/ Python library modules
605Makefile.in Source from which config.status creates Makefile
606Misc/ Miscellaneous files
607Modules/ Implementation of most built-in modules
608Objects/ Implementation of most built-in object types
609Parser/ The parser and tokenizer and their input handling
610Python/ The "compiler" and interpreter
611README The file you're reading now
612Tools/ Some useful programs written in Python
613acconfig.h Additional input for the autoheader program
614config.h.in Source from which config.status creates config.h
615configure Configuration shell script (GNU autoconf output)
616configure.in Configuration specification (GNU autoconf input)
617install-sh Shell script used to install files
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000618
619The following files will (may) be created in the toplevel directory by
620the configuration and build processes:
621
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000622Makefile Build rules
623config.cache cache of configuration variables
624config.h Configuration header
625config.log log from last configure run
626config.status status from last run of configure script
627python The executable interpreter
628tags, TAGS Tags files for vi and Emacs
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000629
630
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000631Author's address
Guido van Rossumd0fe8451996-08-26 03:02:37 +0000632================
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000633
634Guido van Rossum
Guido van Rossumfaf681a1996-06-20 14:32:08 +0000635CNRI
6361895 Preston White Drive
Guido van Rossum8d7d4ed1996-07-30 21:41:07 +0000637Reston, VA 20191
Guido van Rossumfaf681a1996-06-20 14:32:08 +0000638USA
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000639
Guido van Rossumd0fe8451996-08-26 03:02:37 +0000640E-mail: guido@cnri.reston.va.us or guido@python.org
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000641
642
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000643
644Copyright notice
645================
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000646
647The Python source is copyrighted, but you can freely use and copy it
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000648as long as you don't change or remove the copyright notice:
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000649
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000650----------------------------------------------------------------------
Guido van Rossumaf5b83e1995-01-04 19:02:35 +0000651Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
652The Netherlands.
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000653
654 All Rights Reserved
655
Guido van Rossumc561e5d1994-08-23 13:52:46 +0000656Permission to use, copy, modify, and distribute this software and its
657documentation for any purpose and without fee is hereby granted,
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000658provided that the above copyright notice appear in all copies and that
Guido van Rossumc561e5d1994-08-23 13:52:46 +0000659both that copyright notice and this permission notice appear in
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000660supporting documentation, and that the names of Stichting Mathematisch
661Centrum or CWI not be used in advertising or publicity pertaining to
662distribution of the software without specific, written prior permission.
663
664STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
665THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
666FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
667FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
668WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
669ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
670OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000671----------------------------------------------------------------------
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000672
673
Guido van Rossumfaf681a1996-06-20 14:32:08 +0000674--Guido van Rossum (home page: http://www.python.org/~guido/)