Guido van Rossum | fc4966b | 1998-12-17 18:00:33 +0000 | [diff] [blame] | 1 | Python 1.5.x (x > 1) for BeOS |
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 | |
Guido van Rossum | fc4966b | 1998-12-17 18:00:33 +0000 | [diff] [blame] | 8 | ar-fake - A shell script used by the build process to emulate a "real" |
| 9 | POSIX ar command; helps to build the Python shared library. |
Guido van Rossum | d8eb211 | 1998-08-04 17:57:28 +0000 | [diff] [blame] | 10 | |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 11 | dl_export.h - A header defining the evil magic declaration decorations |
| 12 | required for dynamic loading. |
| 13 | |
Guido van Rossum | d8eb211 | 1998-08-04 17:57:28 +0000 | [diff] [blame] | 14 | linkcc - A shell script used by the build process to build the Python |
| 15 | shared library. |
| 16 | |
| 17 | linkmodule - A shell script used by the build process to build the |
| 18 | shared library versions of the standard modules; you'll |
| 19 | probably need this if you want to build dynamically loaded |
| 20 | modules from the Python archives. |
| 21 | |
Guido van Rossum | d8eb211 | 1998-08-04 17:57:28 +0000 | [diff] [blame] | 22 | README - This file (obviously!). |
| 23 | |
| 24 | README.readline-2.2 - Instructions for compiling/installing GNU readline 2.2. |
| 25 | You'll have to grab the GNU readline source code from |
| 26 | prep.ai.mit.edu:/pub/GNU or any other GNU mirror. |
| 27 | |
| 28 | The Python interpreter is much nicer to work with |
| 29 | interactively if you've got readline installed. Highly |
| 30 | recommended. |
| 31 | |
| 32 | Compiling Your Own Version |
| 33 | |
Guido van Rossum | fc4966b | 1998-12-17 18:00:33 +0000 | [diff] [blame] | 34 | To compile your own version of Python 1.5.x for BeOS (with any luck, |
| 35 | Python 1.5.2 and later will compile "out of the box" on BeOS), try this: |
Guido van Rossum | d8eb211 | 1998-08-04 17:57:28 +0000 | [diff] [blame] | 36 | |
Guido van Rossum | fc4966b | 1998-12-17 18:00:33 +0000 | [diff] [blame] | 37 | 1) Get the latest Python source code from ftp.python.org. |
Guido van Rossum | d8eb211 | 1998-08-04 17:57:28 +0000 | [diff] [blame] | 38 | |
Guido van Rossum | fc4966b | 1998-12-17 18:00:33 +0000 | [diff] [blame] | 39 | 2) Configure with: |
Guido van Rossum | d8eb211 | 1998-08-04 17:57:28 +0000 | [diff] [blame] | 40 | |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 41 | ./configure --verbose --prefix=/boot/home/config --with-thread |
Guido van Rossum | eb45232 | 1998-12-18 22:00:58 +0000 | [diff] [blame] | 42 | |
Guido van Rossum | fc4966b | 1998-12-17 18:00:33 +0000 | [diff] [blame] | 43 | 3) Copy Modules/Setup.in to Modules/Setup. |
Guido van Rossum | d8eb211 | 1998-08-04 17:57:28 +0000 | [diff] [blame] | 44 | |
Guido van Rossum | fc4966b | 1998-12-17 18:00:33 +0000 | [diff] [blame] | 45 | 4) Edit Modules/Setup to turn on all the modules you want built. |
Guido van Rossum | d8eb211 | 1998-08-04 17:57:28 +0000 | [diff] [blame] | 46 | |
Guido van Rossum | d8eb211 | 1998-08-04 17:57:28 +0000 | [diff] [blame] | 47 | Make sure you use _socket instead of socket for the name of the |
| 48 | socketmodule on BeOS. |
| 49 | |
Guido van Rossum | fc4966b | 1998-12-17 18:00:33 +0000 | [diff] [blame] | 50 | If you want the modules to be built as shared libraries, instead of as |
| 51 | part of the Python shared library, be sure to uncomment the #*shared* |
| 52 | line. |
Guido van Rossum | d8eb211 | 1998-08-04 17:57:28 +0000 | [diff] [blame] | 53 | |
Guido van Rossum | 343848b | 1998-12-22 13:35:29 +0000 | [diff] [blame] | 54 | I've tried the following modules: |
| 55 | |
| 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 |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 60 | |
| 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. |
Guido van Rossum | 343848b | 1998-12-22 13:35:29 +0000 | [diff] [blame] | 65 | |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 66 | 5) Make: |
Guido van Rossum | d8eb211 | 1998-08-04 17:57:28 +0000 | [diff] [blame] | 67 | |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 68 | make |
Guido van Rossum | d8eb211 | 1998-08-04 17:57:28 +0000 | [diff] [blame] | 69 | |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 70 | 6) Test: |
Guido van Rossum | fc4966b | 1998-12-17 18:00:33 +0000 | [diff] [blame] | 71 | |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 72 | make test |
Guido van Rossum | d8eb211 | 1998-08-04 17:57:28 +0000 | [diff] [blame] | 73 | |
| 74 | Expect the following errors: |
| 75 | |
Guido van Rossum | d8eb211 | 1998-08-04 17:57:28 +0000 | [diff] [blame] | 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 |
| 79 | |
| 80 | 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] | 81 | sockets), or valid differences between systems. |
Guido van Rossum | d8eb211 | 1998-08-04 17:57:28 +0000 | [diff] [blame] | 82 | |
Guido van Rossum | fc4966b | 1998-12-17 18:00:33 +0000 | [diff] [blame] | 83 | NOTE: On R4/x86, the pause() function is broken; expect the signal |
| 84 | module test to crash Python! |
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 | 7) Install: |
Guido van Rossum | d8eb211 | 1998-08-04 17:57:28 +0000 | [diff] [blame] | 87 | |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 88 | make install |
Guido van Rossum | d8eb211 | 1998-08-04 17:57:28 +0000 | [diff] [blame] | 89 | |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 90 | 8) Enjoy! |
Guido van Rossum | eb45232 | 1998-12-18 22:00:58 +0000 | [diff] [blame] | 91 | |
Guido van Rossum | 7a5f420 | 1999-01-12 20:30:23 +0000 | [diff] [blame] | 92 | - Chris Herborth (chrish@beoscentral.com) |
| 93 | January 12, 1999 |