blob: ab71bd9bb415571b84e90a190f2b81cc65039754 [file] [log] [blame]
Fred Drake56221a72000-08-15 18:52:33 +00001Python for BeOS R5
Guido van Rossumd8eb2111998-08-04 17:57:28 +00002
3This directory contains several useful things to help you build your own
4version of Python for BeOS.
5
Guido van Rossumd8eb2111998-08-04 17:57:28 +00006What's Here?
7
Fred Drake60ad79f2000-10-06 16:17:21 +00008ar-fake - A shell script that copies around .o files, for the as much
9 of the general effect of ar as we need but more fool-proof.
10 It also has an "so" command to build the shared library
11 that we actually install and use.
Guido van Rossumd8eb2111998-08-04 17:57:28 +000012
13linkmodule - A shell script used by the build process to build the
14 shared library versions of the standard modules; you'll
15 probably need this if you want to build dynamically loaded
16 modules from the Python archives.
17
Guido van Rossumd8eb2111998-08-04 17:57:28 +000018README - This file (obviously!).
19
20README.readline-2.2 - Instructions for compiling/installing GNU readline 2.2.
Fred Drake60ad79f2000-10-06 16:17:21 +000021 You'll have to grab the GNU readline source code from
Guido van Rossumd8eb2111998-08-04 17:57:28 +000022 prep.ai.mit.edu:/pub/GNU or any other GNU mirror.
23
24 The Python interpreter is much nicer to work with
25 interactively if you've got readline installed. Highly
26 recommended.
27
Fred Drake60ad79f2000-10-06 16:17:21 +000028To build,
Guido van Rossumd8eb2111998-08-04 17:57:28 +000029
Fred Drake60ad79f2000-10-06 16:17:21 +000030 1) ./configure --prefix=/boot/home/config
Guido van Rossumd8eb2111998-08-04 17:57:28 +000031
Fred Drake60ad79f2000-10-06 16:17:21 +000032 2) cp Modules/Setup.in Modules/Setup
33 edit Modules/Setup
34 comment out grp and mmap, and pwd on 4.5 or earlier
35 uncomment any modules you want to include in python
36 (you can also add them later as shared libraries.)
37 3) make
Guido van Rossumd8eb2111998-08-04 17:57:28 +000038
Fred Drake60ad79f2000-10-06 16:17:21 +000039Test:
Guido van Rossumfc4966b1998-12-17 18:00:33 +000040
Guido van Rossum7a5f4201999-01-12 20:30:23 +000041 make test
Guido van Rossumd8eb2111998-08-04 17:57:28 +000042
Fred Drake60ad79f2000-10-06 16:17:21 +000043 [Chris Herborth writes:]
Fred Drake56221a72000-08-15 18:52:33 +000044 test_popen2 will probably hang; it's deadlocked on a semaphore. I should
45 probably disable popen2 support... it uses fork(), and fork() doesn't mix
46 with threads on BeOS. In *THEORY* you could use it in a single-threaded
47 program, but I haven't tried.
Fred Drake60ad79f2000-10-06 16:17:21 +000048
Fred Drake56221a72000-08-15 18:52:33 +000049 If test_popen2 does hang, you can find the semaphore it's hung on via the
50 "ps" command. Look for python and you'll find something like this:
Fred Drake60ad79f2000-10-06 16:17:21 +000051
Fred Drake56221a72000-08-15 18:52:33 +000052./python -tt ../src/Lib/test/regrtest.py (team 26922) (uid 0) (gid 0)
53 39472 python sem 10 3785 1500 piperd(360526)
54./python -tt ../src/Lib/test/regrtest.py (team 26923) (uid 0) (gid 0)
55 39477 python sem 10 25 4 python lock (1)(360022)
56 ^^^^^^
57 That last number is the semaphore the fork()'d python is stuck on
58 (see how it's helpfully called "python lock (1)"? :-). You can unblock
59 that semaphore to let the tests continue using the "release" command
60 with that semaphore number. Be _very_ careful with "release" though,
61 releasing the wrong semaphore can be hazardous.
62
Guido van Rossumd8eb2111998-08-04 17:57:28 +000063 Expect the following errors:
64
Fred Drake56221a72000-08-15 18:52:33 +000065 test * skipped -- an optional feature could not be imported (you'll see
66 quite a few of these, based on what optional modules
67 you've included)
68
69 test test_fork1 skipped -- can't mix os.fork with threads on BeOS
70
Fred Drake60ad79f2000-10-06 16:17:21 +000071 test test_select crashed -- select.error : (-2147459072, 'Bad file
Fred Drake56221a72000-08-15 18:52:33 +000072 descriptor')
73
74 test test_socket crashed -- exceptions.AttributeError : SOCK_RAW
Guido van Rossumd8eb2111998-08-04 17:57:28 +000075
76 These are all due to either partial support for certain things (like
Guido van Rossumfc4966b1998-12-17 18:00:33 +000077 sockets), or valid differences between systems.
Guido van Rossumd8eb2111998-08-04 17:57:28 +000078
Fred Drake60ad79f2000-10-06 16:17:21 +000079 test test_pickle crashed. This is apparently a serious problem,
80 "complex" number objects reconstructed from a
81 pickle don't compare equal to their ancestors.
82 But it happens on BeOS PPC only, not Intel.
Guido van Rossumd8eb2111998-08-04 17:57:28 +000083
Fred Drake60ad79f2000-10-06 16:17:21 +000084Install:
Guido van Rossumd8eb2111998-08-04 17:57:28 +000085
Guido van Rossum7a5f4201999-01-12 20:30:23 +000086 make install
Guido van Rossumd8eb2111998-08-04 17:57:28 +000087
Fred Drake60ad79f2000-10-06 16:17:21 +000088Enjoy!
Guido van Rossumeb452321998-12-18 22:00:58 +000089
Fred Drake56221a72000-08-15 18:52:33 +000090- Chris Herborth (chrish@pobox.com)
91 July 21, 2000
Fred Drake60ad79f2000-10-06 16:17:21 +000092
93- Donn Cave (donn@oz.net)
94 October 4, 2000