Fred Drake | 56221a7 | 2000-08-15 18:52:33 +0000 | [diff] [blame] | 1 | Python for BeOS R5 |
Guido van Rossum | d8eb211 | 1998-08-04 17:57:28 +0000 | [diff] [blame] | 2 | |
| 3 | This directory contains several useful things to help you build your own |
| 4 | version of Python for BeOS. |
| 5 | |
Guido van Rossum | d8eb211 | 1998-08-04 17:57:28 +0000 | [diff] [blame] | 6 | What's Here? |
| 7 | |
Fred Drake | 60ad79f | 2000-10-06 16:17:21 +0000 | [diff] [blame^] | 8 | ar-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 Rossum | d8eb211 | 1998-08-04 17:57:28 +0000 | [diff] [blame] | 12 | |
| 13 | linkmodule - 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 Rossum | d8eb211 | 1998-08-04 17:57:28 +0000 | [diff] [blame] | 18 | README - This file (obviously!). |
| 19 | |
| 20 | README.readline-2.2 - Instructions for compiling/installing GNU readline 2.2. |
Fred Drake | 60ad79f | 2000-10-06 16:17:21 +0000 | [diff] [blame^] | 21 | You'll have to grab the GNU readline source code from |
Guido van Rossum | d8eb211 | 1998-08-04 17:57:28 +0000 | [diff] [blame] | 22 | 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 Drake | 60ad79f | 2000-10-06 16:17:21 +0000 | [diff] [blame^] | 28 | To build, |
Guido van Rossum | d8eb211 | 1998-08-04 17:57:28 +0000 | [diff] [blame] | 29 | |
Fred Drake | 60ad79f | 2000-10-06 16:17:21 +0000 | [diff] [blame^] | 30 | 1) ./configure --prefix=/boot/home/config |
Guido van Rossum | d8eb211 | 1998-08-04 17:57:28 +0000 | [diff] [blame] | 31 | |
Fred Drake | 60ad79f | 2000-10-06 16:17:21 +0000 | [diff] [blame^] | 32 | 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 Rossum | d8eb211 | 1998-08-04 17:57:28 +0000 | [diff] [blame] | 38 | |
Fred Drake | 60ad79f | 2000-10-06 16:17:21 +0000 | [diff] [blame^] | 39 | Test: |
Guido van Rossum | fc4966b | 1998-12-17 18:00:33 +0000 | [diff] [blame] | 40 | |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 41 | make test |
Guido van Rossum | d8eb211 | 1998-08-04 17:57:28 +0000 | [diff] [blame] | 42 | |
Fred Drake | 60ad79f | 2000-10-06 16:17:21 +0000 | [diff] [blame^] | 43 | [Chris Herborth writes:] |
Fred Drake | 56221a7 | 2000-08-15 18:52:33 +0000 | [diff] [blame] | 44 | 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 Drake | 60ad79f | 2000-10-06 16:17:21 +0000 | [diff] [blame^] | 48 | |
Fred Drake | 56221a7 | 2000-08-15 18:52:33 +0000 | [diff] [blame] | 49 | 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 Drake | 60ad79f | 2000-10-06 16:17:21 +0000 | [diff] [blame^] | 51 | |
Fred Drake | 56221a7 | 2000-08-15 18:52:33 +0000 | [diff] [blame] | 52 | ./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 Rossum | d8eb211 | 1998-08-04 17:57:28 +0000 | [diff] [blame] | 63 | Expect the following errors: |
| 64 | |
Fred Drake | 56221a7 | 2000-08-15 18:52:33 +0000 | [diff] [blame] | 65 | 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 Drake | 60ad79f | 2000-10-06 16:17:21 +0000 | [diff] [blame^] | 71 | test test_select crashed -- select.error : (-2147459072, 'Bad file |
Fred Drake | 56221a7 | 2000-08-15 18:52:33 +0000 | [diff] [blame] | 72 | descriptor') |
| 73 | |
| 74 | test test_socket crashed -- exceptions.AttributeError : SOCK_RAW |
Guido van Rossum | d8eb211 | 1998-08-04 17:57:28 +0000 | [diff] [blame] | 75 | |
| 76 | These are all due to either partial support for certain things (like |
Guido van Rossum | fc4966b | 1998-12-17 18:00:33 +0000 | [diff] [blame] | 77 | sockets), or valid differences between systems. |
Guido van Rossum | d8eb211 | 1998-08-04 17:57:28 +0000 | [diff] [blame] | 78 | |
Fred Drake | 60ad79f | 2000-10-06 16:17:21 +0000 | [diff] [blame^] | 79 | 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 Rossum | d8eb211 | 1998-08-04 17:57:28 +0000 | [diff] [blame] | 83 | |
Fred Drake | 60ad79f | 2000-10-06 16:17:21 +0000 | [diff] [blame^] | 84 | Install: |
Guido van Rossum | d8eb211 | 1998-08-04 17:57:28 +0000 | [diff] [blame] | 85 | |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 86 | make install |
Guido van Rossum | d8eb211 | 1998-08-04 17:57:28 +0000 | [diff] [blame] | 87 | |
Fred Drake | 60ad79f | 2000-10-06 16:17:21 +0000 | [diff] [blame^] | 88 | Enjoy! |
Guido van Rossum | eb45232 | 1998-12-18 22:00:58 +0000 | [diff] [blame] | 89 | |
Fred Drake | 56221a7 | 2000-08-15 18:52:33 +0000 | [diff] [blame] | 90 | - Chris Herborth (chrish@pobox.com) |
| 91 | July 21, 2000 |
Fred Drake | 60ad79f | 2000-10-06 16:17:21 +0000 | [diff] [blame^] | 92 | |
| 93 | - Donn Cave (donn@oz.net) |
| 94 | October 4, 2000 |