1- Python 1.5.x (x > 1) for BeOS
1+ Python for BeOS R5
22
33This directory contains several useful things to help you build your own
44version of Python for BeOS.
@@ -45,23 +45,25 @@ Python 1.5.2 and later will compile "out of the box" on BeOS), try this:
45454) Edit Modules/Setup to turn on all the modules you want built.
4646
4747 Make sure you use _socket instead of socket for the name of the
48- socketmodule on BeOS.
48+ socketmodule on BeOS (at least, until we get the new BONE networking) .
4949
5050 If you want the modules to be built as shared libraries, instead of as
5151 part of the Python shared library, be sure to uncomment the #*shared*
52- line.
52+ line. I haven't done much testing with static linking, it's not as
53+ interesting.
5354
5455 I've tried the following modules:
5556
56- regex pcre posix signal readline array cmath math strop struct time
57- operator _locale fcntl pwd grp select _socket errno crypt termios
58- audioop imageop rgbimg md5 timing rotor syslog curses new gdbm soundex
59- binascii parser cStringIO cPickle zlib
57+ array audioop binascii cmath _codecs cPickle crypt cStringIO _curses
58+ errno fcntl gdbm grp imageop _locale math md5 new operator parser
59+ pcre posix pwd pyexpat readline regex rgbimg rotor select sha signal
60+ _socket soundex _sre strop struct syslog termios time timing ucnhash
61+ unicodedata zlib
6062
61- Note that some of these (readline, curses, gdbm, and zlib) require extra
62- libraries that aren't supplied with Python. If you don't have the extra
63- libs (you can probably get them from GeekGadgets), don't try to use
64- these modules; they won't compile.
63+ Note that some of these require extra libraries that aren't supplied
64+ with Python. If you don't have the extra libs (you can probably get
65+ them from GeekGadgets), don't try to use these modules; they won't
66+ compile.
6567
66685) Make:
6769
@@ -71,23 +73,51 @@ Python 1.5.2 and later will compile "out of the box" on BeOS), try this:
7173
7274 make test
7375
76+ test_popen2 will probably hang; it's deadlocked on a semaphore. I should
77+ probably disable popen2 support... it uses fork(), and fork() doesn't mix
78+ with threads on BeOS. In *THEORY* you could use it in a single-threaded
79+ program, but I haven't tried.
80+
81+ If test_popen2 does hang, you can find the semaphore it's hung on via the
82+ "ps" command. Look for python and you'll find something like this:
83+
84+ ./python -tt ../src/Lib/test/regrtest.py (team 26922) (uid 0) (gid 0)
85+ 39472 python sem 10 3785 1500 piperd(360526)
86+ ./python -tt ../src/Lib/test/regrtest.py (team 26923) (uid 0) (gid 0)
87+ 39477 python sem 10 25 4 python lock (1)(360022)
88+ ^^^^^^
89+ That last number is the semaphore the fork()'d python is stuck on
90+ (see how it's helpfully called "python lock (1)"? :-). You can unblock
91+ that semaphore to let the tests continue using the "release" command
92+ with that semaphore number. Be _very_ careful with "release" though,
93+ releasing the wrong semaphore can be hazardous.
94+
7495 Expect the following errors:
7596
76- test_grp crashed -- exceptions.KeyError : getgrnam(): name not found
77- test_pwd failed -- Writing: 'fakename', expected: 'caught e'
78- test_socket crashed -- exceptions.AttributeError : SOCK_RAW
97+ test * skipped -- an optional feature could not be imported (you'll see
98+ quite a few of these, based on what optional modules
99+ you've included)
100+
101+ test test_fork1 skipped -- can't mix os.fork with threads on BeOS
102+
103+ test test_re failed -- Writing: '=== Failed incorrectly', expected:
104+ "('abc', 'abc', 0, 'fou"
105+
106+ test test_select crashed -- select.error : (-2147459072, 'Bad file
107+ descriptor')
108+
109+ test test_socket crashed -- exceptions.AttributeError : SOCK_RAW
79110
80111 These are all due to either partial support for certain things (like
81112 sockets), or valid differences between systems.
82113
83- NOTE: On R4/x86, the pause() function is broken; expect the signal
84- module test to crash Python!
114+ That test_re failure is a little worrysome though.
85115
861167) Install:
87117
88118 make install
89119
901208) Enjoy!
91121
92- - Chris Herborth (chrish@beoscentral .com)
93- January 12, 1999
122+ - Chris Herborth (chrish@pobox .com)
123+ July 21, 2000
0 commit comments