blob: 2588e0f600efe5a78f2abbd8bb13bf42779fb31a [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 Rossum6d9cc801996-08-01 17:31:22 +0000177NeXT: Some more changes are in the works, but were submitted too
178 late to make it to beta2. You may want to remove "-Wall" from
179 the OPT variable, for instance, unless you are a masochist.
180
181
182Configuring additional built-in modules
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000183---------------------------------------
Guido van Rossum19e0c261995-01-17 16:36:34 +0000184
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000185You can configure the interpreter to contain fewer or more built-in
186modules by editing the file Modules/Setup. This file is initially
187copied (when the toplevel Makefile makes Modules/Makefile for the
188first time) from Setup.in; if it does not exist yet, make a copy
189yourself. Never edit Setup.in -- always edit Setup. Read the
190comments in the file for information on what kind of edits you can
191make. When you have edited Setup, Makefile and config.c in Modules
192will automatically be rebuilt the next time you run make in the
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000193toplevel directory. (When working inside the Modules directory, use
194"make Makefile; make".)
Guido van Rossum627b2d71993-12-24 10:39:16 +0000195
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000196The default collection of modules should build on any Unix system, but
197many optional modules should work on all modern Unices (e.g. try dbm,
Guido van Rossumd0fe8451996-08-26 03:02:37 +0000198nis, termios, timing, syslog, curses, new, soundex, parser). Often
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000199the quickest way to determine whether a particular module works or not
200is to see if it will build: enable it in Setup, then if you get
201compilation or link errors, disable it -- you're missing support.
202
203On SGI IRIX, there are modules that interface to many SGI specific
204system libraries, e.g. the GL library and the audio hardware.
205
206For SunOS and Solaris, enable module "sunaudiodev" to support the
207audio device.
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000208
209
210Setting the optimization/debugging options
211------------------------------------------
212
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000213If you want or need to change the optimization/debugging options for
214the C compiler, assign to the OPT variable on the toplevel make
215command; e.g. "make OPT=-g" will build a debugging version of Python
216on most platforms. The default is OPT=-O; a value for OPT in the
217environment when the configure script is run overrides this default
218(likewise for CC; and the initial value for LIBS is used as the base
219set of libraries to link with).
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000220
221
222Testing
223-------
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000224
225To test the interpreter that you have just built, type "make test".
226This runs the test set silently, twice (once with no compiled files,
227once with the compiled files left by the previous test run). Each
228test run should print "All tests OK." and nothing more. (The test set
229does not test the built-in modules, but will find most other problems
230with the interpreter.)
231
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000232IMPORTANT: If the tests fail and you decide to mail a bug report,
233*don't* include the output of "make test". It is useless. Run the
234following command instead:
235
Guido van Rossumdfcf35d1996-08-26 17:52:09 +0000236 PYTHONPATH=../Lib:../Lib/test:./Modules ./python -c 'import testall'
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000237
238(substituting the top of the source tree for .. if you built in a
239different directory). This gives the output of the tests and shows
240which test failed.
241
242
243Installing
244----------
245
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000246Installing Python was never this easy!
Guido van Rossum8d7d4ed1996-07-30 21:41:07 +0000247
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000248To install the Python binary, library modules, shared library modules
249(see below), include files, configuration files, and the manual page,
250just type "make install". This will install all platform-independent
251files in subdirectories the directory given with the --prefix option
252to configure or the 'prefix' Make variable (default /usr/local), and
253all binary and other platform-specific files in subdirectories if the
254directory given by --exec-prefix or the 'exec_prefix' Make variable
255(defaults to the --prefix directory). All subdirectories created will
256have Python's version number in their name, e.g. the library modules
257are installed in "/usr/local/lib/python1.4/" by default. The Python
258binary is installed as "python1.4" and a hard link named "python" is
259created. The only file not installed with a version number in its
260name is the manual page, installed as "/usr/local/man/man1/python.1"
261by default.
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000262
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000263If you have a previous installation of a pre-1.4 Python that you don't
264want to replace yet, use "make altinstall". This installs the same
265set of files as "make install" except it doesn't create the hard link
266to "python1.4" named "python" and it doesn't install the manual page
267at all.
268
269The only thing you may have to install manually is the Python mode for
270Emacs. (But then again, more recent versions of Emacs may already
271have it!) This is the file Misc/python-mode.el; follow the
272instructions that came with Emacs for installation of site specific
273files.
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000274
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000275
276Configuration options and variables
277-----------------------------------
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000278
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000279Some special cases are handled by passing options to the configure
280script.
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000281
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000282WARNING: if you rerun the configure script with different options, you
283must run "make clean" before rebuilding. Exceptions to this rule:
284after changing --prefix or --exec-prefix, all you need to do is remove
285Modules/getpath.o; after changing --with-readline, just remove
286Parser/myreadline.o.
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000287
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000288--with(out)-gcc: The configure script uses gcc (the GNU C compiler) if
289 it finds it. If you don't want this, or if this compiler is
290 installed but broken on your platform, pass the option
291 --without-gcc. You can also pass "CC=cc" (or whatever the
292 name of the proper C compiler is) in the environment, but the
293 advantage of using --without-gcc is that this option is
294 remembered by the config.status script for its --recheck
295 option.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000296
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000297--prefix, --exec-prefix: If you want to install the binaries and the
298 Python library somewhere else than in /usr/local/{bin,lib},
299 you can pass the option --prefix=DIRECTORY; the interpreter
300 binary will be installed as DIRECTORY/bin/python and the
301 library files as DIRECTORY/lib/python/*. If you pass
302 --exec-prefix=DIRECTORY (as well) this overrides the
303 installation prefix for architecture-dependent files (like the
304 interpreter binary). Note that --prefix=DIRECTORY also
305 affects the default module search path (sys.path), when
306 Modules/config.c is compiled. Passing make the option
307 prefix=DIRECTORY (and/or exec_prefix=DIRECTORY) overrides the
308 prefix set at configuration time; this may be more convenient
309 than re-running the configure script if you change your mind
310 about the install prefix...
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000311
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000312--with-readline: You can use the GNU readline library to improve the
Guido van Rossumfaf681a1996-06-20 14:32:08 +0000313 interactive user interface. This gives you line editing and
314 command history when calling Python interactively. Unless GNU
315 readline is a standard part of your system (it is on Linux),
316 you need to configure build the GNU readline library before
317 running the configure script. Its sources are not distributed
318 with Python; you can ftp them from any GNU mirror site, or
319 from its home site:
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000320 ftp://slc2.ins.cwru.edu/pub/dist/readline-2.0.tar.gz (or
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000321 a higher version number -- using version 1.x is not
322 recommended).
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000323
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000324 A GPL-free version was posted to comp.sources.misc in volume
325 31 and is widely available from FTP archive sites, e.g.
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000326 ftp://gatekeeper.dec.com/.
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000327
328 Pass the Python configure script the option
329 --with-readline=DIRECTORY where DIRECTORY is the absolute
330 pathname of the directory where you've built the readline
Guido van Rossumfaf681a1996-06-20 14:32:08 +0000331 library. If GNU readline is a standard part of your system,
332 don't pass '=DIRECTORY'. Some hints on building and using the
333 readline library are in the FAQ (file Misc/FAQ).
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000334
Guido van Rossumfaf681a1996-06-20 14:32:08 +0000335--with-thread: On most Unix systems, you can now use multiple threads.
336 To enable this, pass --with-thread. If the library required
337 for threads lives in a peculiar place, you can use
338 --with-thread=DIRECTORY. In the Modules/Setup file, enable
339 the thread module. (Threads aren't enabled automatically
340 because there are run-time penalties when support for them is
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000341 compiled in even if you don't use them.) IMPORTANT: run "make
342 clean" after changing (either enabling or disabling) this
343 option!
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000344
345--with-sgi-dl: On SGI IRIX 4, dynamic loading of extension modules is
346 supported by the "dl" library by Jack Jansen, which is
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000347 ftp'able from ftp://ftp.cwi.nl/pub/dynload/dl-1.6.tar.Z.
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000348 This is enabled (after you've ftp'ed and compiled the dl
349 library!) by passing --with-sgi-dl=DIRECTORY where DIRECTORY
350 is the absolute pathname of the dl library. (Don't bother on
351 IRIX 5, it already has dynamic linking using SunOS style
352 shared libraries.) Support for this feature is deprecated.
353
354--with-dl-dld: Dynamic loading of modules is rumoured to be supported
355 on some other systems: VAX (Ultrix), Sun3 (SunOS 3.4), Sequent
356 Symmetry (Dynix), and Atari ST. This is done using a
357 combination of the GNU dynamic loading package
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000358 (ftp://ftp.cwi.nl/pub/dynload/dl-dld-1.1.tar.Z) and an
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000359 emulation of the SGI dl library mentioned above (the emulation
360 can be found at
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000361 ftp://ftp.cwi.nl/pub/dynload/dld-3.2.3.tar.Z). To
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000362 enable this, ftp and compile both libraries, then call the
363 configure passing it the option
364 --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY where DL_DIRECTORY is
365 the absolute pathname of the dl emulation library and
366 DLD_DIRECTORY is the absolute pathname of the GNU dld library.
367 (Don't bother on SunOS 4 or 5, they already have dynamic
368 linking using shared libraries.) Support for this feature is
369 deprecated.
370
371--with-libm, --with-libc: It is possible to specify alternative
372 versions for the Math library (default -lm) and the C library
373 (default the empty string) using the options
374 --with-libm=STRING and --with-libc=STRING, respectively. E.g.
375 if your system requires that you pass -lc_s to the C compiler
376 to use the shared C library, you can pass --with-libc=-lc_s.
377 These libraries are passed after all other libraries, the C
378 library last.
Guido van Rossum3ff96dd1996-07-30 18:05:04 +0000379
380--with-next-archs='arch1 arch2': Under NEXTSTEP, this will build
381 all compiled binaries with the architectures listed. Includes
382 correctly setting the target architecture specific resource
383 directory.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000384
Guido van Rossumd02ba451996-07-31 17:36:01 +0000385--with-libs='libs': Add 'libs' to the LIBS that the python
386 linked against.
387
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000388
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000389Building for multiple architectures (using the VPATH feature)
390-------------------------------------------------------------
391
392If your file system is shared between multiple architectures, it
393usually is not necessary to make copies of the sources for each
394architecture you want to support. If the make program supports the
395VPATH feature, you can create an empty build directory for each
396architecture, and in each directory run the configure script (on the
397appropriate machine with the appropriate options). This creates the
398necessary subdirectories and the Makefiles therein. The Makefiles
399contain a line VPATH=... which points to directory containing the
Guido van Rossumd0fe8451996-08-26 03:02:37 +0000400actual sources. (On SGI systems, use "smake -J1" instead of "make" if
401you use VPATH -- don't try gnumake.)
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000402
403For example, the following is all you need to build a minimal Python
404in /usr/tmp/python (assuming ~guido/src/python is the toplevel
405directory and you want to build in /usr/tmp/python):
406
407 $ mkdir /usr/tmp/python
408 $ cd /usr/tmp/python
409 $ ~guido/src/python/configure
410 [...]
411 $ make
412 [...]
413 $
414
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000415Note that Modules/Makefile copies the original Setup file to the build
416directory if it finds no Setup file there. This means that you can
417edit the Setup file for each architecture independently. For this
418reason, subsequent changes to the original Setup file are not tracked
419automatically, as they might overwrite local changes. To force a copy
420of a changed original Setup file, delete the target Setup file. (The
421makesetup script supports multiple input files, so if you want to be
422fancy you can change the rules to create an empty Setup.local if it
423doesn't exist and run it with arguments $(srcdir)/Setup Setup.local;
424however this assumes that you only need to add modules.)
425
426
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000427Building on non-UNIX systems
428----------------------------
429
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000430Building Python for a PC is now a piece of cake!
Guido van Rossum8d7d4ed1996-07-30 21:41:07 +0000431
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000432Enter the directory "PC" and read the file "readme.txt". Most popular
433non-Unix PC platforms and compilers are supported (Unix ports to the
434PC such as Linux, FreeBSD or Solaris-x86 of course use the standard
435Unix build instructions).
436
437For the Mac, a separate source distribution will be made available,
438for use with the CodeWarrior compiler. If you are interested in Mac
439development, join the PythonMac Special Interest Group
440(http://www.python.org/sigs/pythonmac-sig/, or send email to
441pythonmac-sig-request@python.org).
442
443Of course, there are also binary distributions available for these
444platforms -- see http://www.python.org/python/.
445
446To port Python to a new non-UNIX system, you will have to fake the
447effect of running the configure script manually (for Mac and PC, this
448has already been done for you). A good start is to copy the file
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000449config.h.in to config.h and edit the latter to reflect the actual
450configuration of your system. Most symbols must simply be defined as
4511 only if the corresponding feature is present and can be left alone
452otherwise; however RETSIGTYPE must always be defined, either as int or
453as void, and the *_t type symbols must be defined as some variant of
Guido van Rossumd0fe8451996-08-26 03:02:37 +0000454int if they need to be defined at all.
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000455
456
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000457
458Miscellaneous issues
459====================
460
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000461Documentation
462-------------
463
464All documentation is provided in the subdirectory Doc in the form of
465LaTeX files. In order of importance for new users: Tutorial (tut),
466Library Reference (lib), Language Reference (ref), Extending (ext).
467Especially the Library Reference is of immense value since much of
468Python's power (including the built-in data types and functions!) is
469described here.
470
Guido van Rossumdfcf35d1996-08-26 17:52:09 +0000471To print the documentation from the LaTeX files, chdir into the Doc
472subdirectory, type "make" (let's hope you have LaTeX installed!), and
473send the four resulting PostScript files (tut.ps, lib.ps, ref.ps, and
474ext.ps) to the printer. See the README file there. If you don't have
475LaTeX, you can ftp the PostScript files from the ftp archives (see
476below).
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000477
Guido van Rossumdfcf35d1996-08-26 17:52:09 +0000478All documentation is also available on-line via the Python web site
479(http://www.python.org/, see below). It can also be downloaded
480separately from the ftp archives (see below) in Emacs INFO, HTML or
481PostScript form -- see the web site or the FAQ (file Misc/FAQ) for
482more info.
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000483
484
485Emacs mode
486----------
487
Guido van Rossumd0fe8451996-08-26 03:02:37 +0000488There's an excellent Emacs editing mode for Python code; see the file
489Misc/python-mode.el. Originally written by Tim Peters, it is now
490maintained by Barry Warsaw <bwarsaw@cnri.reston.va.us>.
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000491
492
Guido van Rossum8d7d4ed1996-07-30 21:41:07 +0000493Web site
494--------
495
496Python's own web site has URL http://www.python.org/. Come visit us!
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000497There are a number of mirrors, listed on the home page -- try a mirror
498that's close you you.
Guido van Rossum8d7d4ed1996-07-30 21:41:07 +0000499
500
Guido van Rossumd0fe8451996-08-26 03:02:37 +0000501Ftp site
502--------
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000503
Guido van Rossum8d7d4ed1996-07-30 21:41:07 +0000504Python's own ftp site is ftp.python.org, directory /pub/python. See
505the FAQ (file Misc/FAQ) for a list of other ftp sites carrying the
Guido van Rossumfaf681a1996-06-20 14:32:08 +0000506Python distribution.
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000507
508
509Newsgroup and mailing list
510--------------------------
511
Guido van Rossumdfcf35d1996-08-26 17:52:09 +0000512There are a newsgroup and a mailing list devoted to Python. The
513newsgroup, comp.lang.python, contains exactly the same messages as the
514mailing list (though not always in the same order, due to the
515mysterious nature of the Usenet news distribution algorithm). To
516subscribe to the mailing list, send mail containing your real name and
517e-mail address to "python-list-request@cwi.nl". Use the same address
518if you want to unsibscribed. (A real person reads these messages, so
519no LISTPROC or Majordomo commands, please, and please be patient --
520normal turn-around time is about one working day.)
Guido van Rossumd0fe8451996-08-26 03:02:37 +0000521
Guido van Rossumdfcf35d1996-08-26 17:52:09 +0000522The Python web site contains a search form that lets you search the
523newsgroup archives (or the web site itself). Click on the "search"
524link in the banner menu on any page of http://www.python.org/.
Guido van Rossumd0fe8451996-08-26 03:02:37 +0000525
526
527Bug reports
528-----------
529
Guido van Rossumdfcf35d1996-08-26 17:52:09 +0000530Bugs are best reported to the comp.lang.python newsgroup or the Python
531mailing list -- see the section "Newsgroup and mailing list" below.
532Before posting, check the newsgroup archives (see above) to see if
533your bug has already been reported! If you specifically don't want to
534involve the newsgroup or mailing list, send them to
535python-bugs@python.org.
Guido van Rossumd0fe8451996-08-26 03:02:37 +0000536
537
538Questions
539---------
540
541For help, if you can't find it in the manuals, the FAQ or on the web
542site, it's best to post to the comp.lang.python or the Python mailing
543list (see above). If you specifically don't want to involve the
544newsgroup or mailing list, send questions to python-help@python.org.
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000545
546
547The Tk interface
548----------------
549
550Tk (the user interface component of John Ousterhout's Tcl language) is
551also usable from Python. Since this requires that you first build and
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000552install Tcl/Tk, the Tk interface is not enabled by default. It works
553with Tcl 7.5 and Tk 4.1 as well as with Tcl 7.4 and Tk 4.0.
554
555See http://www.smli.com/research/tcl/ for more info on where to get
556Tcl/Tk.
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000557
558To enable the Python/Tk interface, once you've built and installed
559Tcl/Tk, all you need to do is edit two lines in Modules/Setup; search
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000560for the string "_tkinter". Uncomment one (normally the first) of the
561lines beginning with "#_tkinter" and un-comment the line beginning
562with "#TKPATH". If you have installed Tcl/Tk or X11 in unusual
563places, you will have to edit the first line to fix or add -I and -L
564options. See the Build Instructions above for more details.
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000565
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000566There is little documentation on how to use Tkinter; however most of
567the Tk manual pages apply quite straightforwardly. Begin with
568fetching the "Tk Lifesaver" document,
569e.g. ftp://ftp.python.org/pub/python/doc/tkinter-doc.tar.gz (a gzipped
570tar file containing a PostScript file) or the on-line version
571http://www.python.org/doc/life-preserver/index.html. Reading the
572Tkinter.py source will reveal most details on how Tkinter calls are
573translated into Tcl code.
574
575There are demos in the Demo/tkinter directory, in the subdirectories
576guido, matt and www (the matt and guido subdirectories have been
577overhauled to use more recent Tkinter coding conventions).
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000578
579Note that there's a Python module called "Tkinter" (capital T) which
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000580lives in Lib/tkinter/Tkinter.py, and a C module called "_tkinter"
581(lower case t and leading underscore) which lives in
582Modules/_tkinter.c. Demos and normal Tk applications only import the
583Python Tkinter module -- only the latter uses the C _tkinter module
584directly. In order to find the C _tkinter module, it must be compiled
585and linked into the Python interpreter -- the _tkinter line in the
586Setup file does this. In order to find the Python Tkinter module,
587sys.path must be set correctly -- the TKPATH assignment in the Setup
588file takes care of this, but only if you install Python properly
589("make install libinstall"). (You can also use dynamic loading for
590the C _tkinter module, in which case you must manually fix up sys.path
591or set $PYTHONPATH for the Python Tkinter module.)
Guido van Rossum84c8c7f1995-08-28 02:44:24 +0000592
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000593
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000594Distribution structure
595----------------------
596
597Most subdirectories have their own README file. Most files have
598comments.
599
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000600BUGS A list of known bugs (not completely up-to-date)
601TODO A list of things that could be done (not up-to-date)
602Demo/ Demonstration scripts, modules and programs
603Doc/ Documentation (LaTeX sources)
604Grammar/ Input for the parser generator
605Include/ Public header files
606Lib/ Python library modules
607Makefile.in Source from which config.status creates Makefile
608Misc/ Miscellaneous files
609Modules/ Implementation of most built-in modules
610Objects/ Implementation of most built-in object types
611Parser/ The parser and tokenizer and their input handling
612Python/ The "compiler" and interpreter
613README The file you're reading now
614Tools/ Some useful programs written in Python
615acconfig.h Additional input for the autoheader program
616config.h.in Source from which config.status creates config.h
617configure Configuration shell script (GNU autoconf output)
618configure.in Configuration specification (GNU autoconf input)
619install-sh Shell script used to install files
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000620
621The following files will (may) be created in the toplevel directory by
622the configuration and build processes:
623
Guido van Rossum6d9cc801996-08-01 17:31:22 +0000624Makefile Build rules
625config.cache cache of configuration variables
626config.h Configuration header
627config.log log from last configure run
628config.status status from last run of configure script
629python The executable interpreter
630tags, TAGS Tags files for vi and Emacs
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000631
632
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000633Author's address
Guido van Rossumd0fe8451996-08-26 03:02:37 +0000634================
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000635
636Guido van Rossum
Guido van Rossumfaf681a1996-06-20 14:32:08 +0000637CNRI
6381895 Preston White Drive
Guido van Rossum8d7d4ed1996-07-30 21:41:07 +0000639Reston, VA 20191
Guido van Rossumfaf681a1996-06-20 14:32:08 +0000640USA
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000641
Guido van Rossumd0fe8451996-08-26 03:02:37 +0000642E-mail: guido@cnri.reston.va.us or guido@python.org
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000643
644
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000645
646Copyright notice
647================
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000648
649The Python source is copyrighted, but you can freely use and copy it
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000650as long as you don't change or remove the copyright notice:
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000651
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000652----------------------------------------------------------------------
Guido van Rossumaf5b83e1995-01-04 19:02:35 +0000653Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
654The Netherlands.
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000655
656 All Rights Reserved
657
Guido van Rossumc561e5d1994-08-23 13:52:46 +0000658Permission to use, copy, modify, and distribute this software and its
659documentation for any purpose and without fee is hereby granted,
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000660provided that the above copyright notice appear in all copies and that
Guido van Rossumc561e5d1994-08-23 13:52:46 +0000661both that copyright notice and this permission notice appear in
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000662supporting documentation, and that the names of Stichting Mathematisch
663Centrum or CWI not be used in advertising or publicity pertaining to
664distribution of the software without specific, written prior permission.
665
666STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
667THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
668FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
669FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
670WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
671ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
672OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Guido van Rossum91cb9d21995-04-10 11:47:38 +0000673----------------------------------------------------------------------
Guido van Rossum433c8ad1994-08-01 12:07:07 +0000674
675
Guido van Rossumfaf681a1996-06-20 14:32:08 +0000676--Guido van Rossum (home page: http://www.python.org/~guido/)