blob: 0424c4fbe0fa1aedb28882222d350973834d04b1 [file] [log] [blame]
Fred Drake56221a72000-08-15 18:52:33 +00001Python for BeOS R5
Guido van Rossumd8eb2111998-08-04 17:57:28 +00002
Fred Drake60ad79f2000-10-06 16:17:21 +00003To build,
Guido van Rossumd8eb2111998-08-04 17:57:28 +00004
Fred Drake60ad79f2000-10-06 16:17:21 +00005 1) ./configure --prefix=/boot/home/config
Guido van Rossumd8eb2111998-08-04 17:57:28 +00006
Fred Drakecf3bc8c2000-10-26 17:07:40 +00007 2) edit Modules/Setup
Fred Drake60ad79f2000-10-06 16:17:21 +00008 comment out grp and mmap, and pwd on 4.5 or earlier
9 uncomment any modules you want to include in python
10 (you can also add them later as shared libraries.)
11 3) make
Guido van Rossumd8eb2111998-08-04 17:57:28 +000012
Fred Drake60ad79f2000-10-06 16:17:21 +000013Test:
Guido van Rossumfc4966b1998-12-17 18:00:33 +000014
Guido van Rossum7a5f4201999-01-12 20:30:23 +000015 make test
Guido van Rossumd8eb2111998-08-04 17:57:28 +000016
Fred Drake60ad79f2000-10-06 16:17:21 +000017 [Chris Herborth writes:]
Fred Drake56221a72000-08-15 18:52:33 +000018 test_popen2 will probably hang; it's deadlocked on a semaphore. I should
19 probably disable popen2 support... it uses fork(), and fork() doesn't mix
20 with threads on BeOS. In *THEORY* you could use it in a single-threaded
21 program, but I haven't tried.
Fred Drake60ad79f2000-10-06 16:17:21 +000022
Fred Drake56221a72000-08-15 18:52:33 +000023 If test_popen2 does hang, you can find the semaphore it's hung on via the
24 "ps" command. Look for python and you'll find something like this:
Fred Drake60ad79f2000-10-06 16:17:21 +000025
Fred Drake56221a72000-08-15 18:52:33 +000026./python -tt ../src/Lib/test/regrtest.py (team 26922) (uid 0) (gid 0)
27 39472 python sem 10 3785 1500 piperd(360526)
28./python -tt ../src/Lib/test/regrtest.py (team 26923) (uid 0) (gid 0)
29 39477 python sem 10 25 4 python lock (1)(360022)
30 ^^^^^^
31 That last number is the semaphore the fork()'d python is stuck on
32 (see how it's helpfully called "python lock (1)"? :-). You can unblock
33 that semaphore to let the tests continue using the "release" command
34 with that semaphore number. Be _very_ careful with "release" though,
35 releasing the wrong semaphore can be hazardous.
36
Guido van Rossumd8eb2111998-08-04 17:57:28 +000037 Expect the following errors:
38
Fred Drake56221a72000-08-15 18:52:33 +000039 test * skipped -- an optional feature could not be imported (you'll see
40 quite a few of these, based on what optional modules
41 you've included)
42
43 test test_fork1 skipped -- can't mix os.fork with threads on BeOS
44
Fred Drake60ad79f2000-10-06 16:17:21 +000045 test test_select crashed -- select.error : (-2147459072, 'Bad file
Fred Drake56221a72000-08-15 18:52:33 +000046 descriptor')
47
48 test test_socket crashed -- exceptions.AttributeError : SOCK_RAW
Guido van Rossumd8eb2111998-08-04 17:57:28 +000049
50 These are all due to either partial support for certain things (like
Guido van Rossumfc4966b1998-12-17 18:00:33 +000051 sockets), or valid differences between systems.
Guido van Rossumd8eb2111998-08-04 17:57:28 +000052
Fred Drake60ad79f2000-10-06 16:17:21 +000053 test test_pickle crashed. This is apparently a serious problem,
54 "complex" number objects reconstructed from a
55 pickle don't compare equal to their ancestors.
56 But it happens on BeOS PPC only, not Intel.
Guido van Rossumd8eb2111998-08-04 17:57:28 +000057
Fred Drake60ad79f2000-10-06 16:17:21 +000058Install:
Guido van Rossumd8eb2111998-08-04 17:57:28 +000059
Guido van Rossum7a5f4201999-01-12 20:30:23 +000060 make install
Guido van Rossumd8eb2111998-08-04 17:57:28 +000061
Neil Schemenauer6e0e91a2001-02-16 04:35:20 +000062
63Using GNU readline:
64
65 The Python interpreter is much nicer to work with interactively if
66 you've got readline installed. Highly recommended.
67
68 You can get the original GNU readline 2.2 source code from your
69 favourite GNU software repository, such as
70 ftp://prep.ai.mit.edu/pub/gnu/.
71
72 You can get the only-slightly-modified-for-BeOS version of GNU
73 readline 2.2 from the GeekGadgets repository;
74 ftp://ftp.ninemoons.com/pub/geekgadgets/.
75
76
77Building libreadline for BeOS hosts:
78
79 Note that we don't build a shared library version of libreadline and
80 libhistory. That's left as an exercise for the reader.
81
82 You won't be able to link against libreadline.a using the limited
83 linker.
84
85 1) If you're on a PowerPC system, install the POSIX ar from
86 http://www.qnx.com/~chrish/Be/software/index.html#programming
87 (note that it's currently packaged with Python, in the BeOS/ar-1.1
88 directory).
89
90 If you're on an x86 system, you can leave out the "AR=ar-posix"
91 part of the following instructions. In fact, you'll have to...
92
93 2) For PowerPC, configure with:
94
95 CC=mwcc CFLAGS="-O7 -i- -I." AR=ar-posix RANLIB=: ./configure --verbose \
96 --without-gcc --prefix=/boot/home/config powerpc-*-beos
97
98 For x86, configure with:
99
100 CC=mwcc CFLAGS="-O2 -i- -I." RANLIB=: ./configure --verbose \
101 --without-gcc --prefix=/boot/home/config x86-*-beos
102
103 Don't worry about the warnings/errors configure spews for
104 powerpc-*-beos or x86-*-beos; readline doesn't actually use this host
105 information for anything, although configure will die if you don't
106 specify it.
107
108 3) Edit config.h to comment out "#define HAVE_SELECT 1"; select() on
109 BeOS doesn't work on file descriptors (such as stdin).
110
111 4) For PowerPC, make with:
112
113 make AR=ar-posix
114
115 For x86, make with:
116
117 make
118
119 5) Install with:
120
121 make install
122
Fred Drake60ad79f2000-10-06 16:17:21 +0000123Enjoy!
Guido van Rossumeb452321998-12-18 22:00:58 +0000124
Fred Drake56221a72000-08-15 18:52:33 +0000125- Chris Herborth (chrish@pobox.com)
126 July 21, 2000
Fred Drake60ad79f2000-10-06 16:17:21 +0000127
128- Donn Cave (donn@oz.net)
129 October 4, 2000