blob: 90013ee20884b780d814979364a8f84db5b4e7e8 [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 Drakecf3bc8c2000-10-26 17:07:40 +000032 2) edit Modules/Setup
Fred Drake60ad79f2000-10-06 16:17:21 +000033 comment out grp and mmap, and pwd on 4.5 or earlier
34 uncomment any modules you want to include in python
35 (you can also add them later as shared libraries.)
36 3) make
Guido van Rossumd8eb2111998-08-04 17:57:28 +000037
Fred Drake60ad79f2000-10-06 16:17:21 +000038Test:
Guido van Rossumfc4966b1998-12-17 18:00:33 +000039
Guido van Rossum7a5f4201999-01-12 20:30:23 +000040 make test
Guido van Rossumd8eb2111998-08-04 17:57:28 +000041
Fred Drake60ad79f2000-10-06 16:17:21 +000042 [Chris Herborth writes:]
Fred Drake56221a72000-08-15 18:52:33 +000043 test_popen2 will probably hang; it's deadlocked on a semaphore. I should
44 probably disable popen2 support... it uses fork(), and fork() doesn't mix
45 with threads on BeOS. In *THEORY* you could use it in a single-threaded
46 program, but I haven't tried.
Fred Drake60ad79f2000-10-06 16:17:21 +000047
Fred Drake56221a72000-08-15 18:52:33 +000048 If test_popen2 does hang, you can find the semaphore it's hung on via the
49 "ps" command. Look for python and you'll find something like this:
Fred Drake60ad79f2000-10-06 16:17:21 +000050
Fred Drake56221a72000-08-15 18:52:33 +000051./python -tt ../src/Lib/test/regrtest.py (team 26922) (uid 0) (gid 0)
52 39472 python sem 10 3785 1500 piperd(360526)
53./python -tt ../src/Lib/test/regrtest.py (team 26923) (uid 0) (gid 0)
54 39477 python sem 10 25 4 python lock (1)(360022)
55 ^^^^^^
56 That last number is the semaphore the fork()'d python is stuck on
57 (see how it's helpfully called "python lock (1)"? :-). You can unblock
58 that semaphore to let the tests continue using the "release" command
59 with that semaphore number. Be _very_ careful with "release" though,
60 releasing the wrong semaphore can be hazardous.
61
Guido van Rossumd8eb2111998-08-04 17:57:28 +000062 Expect the following errors:
63
Fred Drake56221a72000-08-15 18:52:33 +000064 test * skipped -- an optional feature could not be imported (you'll see
65 quite a few of these, based on what optional modules
66 you've included)
67
68 test test_fork1 skipped -- can't mix os.fork with threads on BeOS
69
Fred Drake60ad79f2000-10-06 16:17:21 +000070 test test_select crashed -- select.error : (-2147459072, 'Bad file
Fred Drake56221a72000-08-15 18:52:33 +000071 descriptor')
72
73 test test_socket crashed -- exceptions.AttributeError : SOCK_RAW
Guido van Rossumd8eb2111998-08-04 17:57:28 +000074
75 These are all due to either partial support for certain things (like
Guido van Rossumfc4966b1998-12-17 18:00:33 +000076 sockets), or valid differences between systems.
Guido van Rossumd8eb2111998-08-04 17:57:28 +000077
Fred Drake60ad79f2000-10-06 16:17:21 +000078 test test_pickle crashed. This is apparently a serious problem,
79 "complex" number objects reconstructed from a
80 pickle don't compare equal to their ancestors.
81 But it happens on BeOS PPC only, not Intel.
Guido van Rossumd8eb2111998-08-04 17:57:28 +000082
Fred Drake60ad79f2000-10-06 16:17:21 +000083Install:
Guido van Rossumd8eb2111998-08-04 17:57:28 +000084
Guido van Rossum7a5f4201999-01-12 20:30:23 +000085 make install
Guido van Rossumd8eb2111998-08-04 17:57:28 +000086
Fred Drake60ad79f2000-10-06 16:17:21 +000087Enjoy!
Guido van Rossumeb452321998-12-18 22:00:58 +000088
Fred Drake56221a72000-08-15 18:52:33 +000089- Chris Herborth (chrish@pobox.com)
90 July 21, 2000
Fred Drake60ad79f2000-10-06 16:17:21 +000091
92- Donn Cave (donn@oz.net)
93 October 4, 2000