|
1 | | -Python 1.5.1 for BeOS |
| 1 | +Python 1.5.x (x > 1) for BeOS |
2 | 2 |
|
3 | 3 | This directory contains several useful things to help you build your own |
4 | 4 | version of Python for BeOS. |
5 | 5 |
|
6 | | -At this time, Python only supports BeOS on the PowerPC platform; if you'd |
7 | | -like to help me port it to the x86 platform, please let me know (I only |
8 | | -have limited access to BeOS on an x86 system). If you'd like to lend |
9 | | -me an x86 laptop running BeOS to do the port, _definitely_ let me know! :-) |
10 | | -I'll even give it back when I'm done. |
11 | | - |
12 | 6 | What's Here? |
13 | 7 |
|
14 | | -ar-1.1 - An "ar" command with a POSIX 1003.2 interface; you'll need |
15 | | - this for building the Python libraries under BeOS |
16 | | - (/bin/ar just won't cut it). |
| 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. |
17 | 10 |
|
18 | 11 | linkcc - A shell script used by the build process to build the Python |
19 | 12 | shared library. |
@@ -41,100 +34,59 @@ README.readline-2.2 - Instructions for compiling/installing GNU readline 2.2. |
41 | 34 |
|
42 | 35 | Compiling Your Own Version |
43 | 36 |
|
44 | | -To compile your own version of Python 1.5.1 for BeOS (with any luck, |
45 | | -Python 1.6 will compile "out of the box" on BeOS), try this: |
46 | | - |
47 | | -1) Get the Python 1.5.1 source code from ftp.python.org. |
48 | | - |
49 | | -2) Get the Python 1.5.1 diffs from my web pages |
50 | | - (http://www.qnx.com/~chrish/Be/software/); if you can't get them through |
51 | | - a web browser, send me email and I'll mail them back to you. These |
52 | | - diffs should also be available at ftp.python.org along with the BeOS |
53 | | - binary archive. |
54 | | - |
55 | | - Run autoconf. If you don't have autoconf, you can get a precompiled |
56 | | - version from GeekGadgets (ftp://ftp.ninemoons.com/pub/geekgadgets/...). |
| 37 | +To compile your own version of Python 1.5.x for BeOS (with any luck, |
| 38 | +Python 1.5.2 and later will compile "out of the box" on BeOS), try this: |
57 | 39 |
|
58 | | -3) Compile and install the POSIX ar from the ar-1.1 directory; see the |
59 | | - README in there for details. |
| 40 | +1) Get the latest Python source code from ftp.python.org. |
60 | 41 |
|
61 | | -4) Configure with: |
| 42 | +2) Configure with: |
62 | 43 |
|
63 | | - AR=ar-posix RANLIB=: ./configure --verbose --without-gcc \ |
| 44 | + AR=$(pwd)/BeOS/ar-fake RANLIB=: ./configure --verbose --without-gcc \ |
64 | 45 | --prefix=/boot/home/config --with-thread |
65 | 46 |
|
66 | | - The only strange thing that happens during the configure is that |
67 | | - we fail the "genuine getopt()" test; this is odd because we've got |
68 | | - a real live GNU getopt() in the system libs. Other packages built |
69 | | - using configure (such as all of the goodies in GeekGadgets) suffer |
70 | | - the same fate though, so it's not a Python problem. |
| 47 | +3) Copy Modules/Setup.in to Modules/Setup. |
71 | 48 |
|
72 | | -5) Copy Modules/Setup.in to Modules/Setup. |
| 49 | +4) Edit Modules/Setup to turn on all the modules you want built. |
73 | 50 |
|
74 | | -6) Edit Modules/Setup to turn on all the modules you want built. I've |
75 | | - personally built the following modules: |
| 51 | + Make sure you use _socket instead of socket for the name of the |
| 52 | + socketmodule on BeOS. |
76 | 53 |
|
77 | | - array, audioop, binascii, cPickle, cStringIO, cmath, crypt, curses, |
78 | | - errno, fcntl, gdbm, grp, imageop, math, md5, new, operator, parser, |
79 | | - pcre, posix, pwd, readline, regex, reop, rgbimg, rotor, select, |
80 | | - signal, socket, soundex, strop, struct, syslog, termios, thread, |
81 | | - time, timing, zlib |
| 54 | + If you want the modules to be built as shared libraries, instead of as |
| 55 | + part of the Python shared library, be sure to uncomment the #*shared* |
| 56 | + line. |
82 | 57 |
|
83 | | - Newly compiled/tested with 1.5.1: |
84 | | - |
85 | | - _locale |
| 58 | +5) Make sure Modules/Makefile.pre has REALLIBRARY set to: |
86 | 59 |
|
87 | | - You can get precompiled gdbm, ncurses, and zlib libraries from the |
88 | | - GeekGadgets repository (ftp://ftp.ninemoons.com/pub/geekgadgets/...). |
89 | | - |
90 | | - Make sure you use _socket instead of socket for the name of the |
91 | | - socketmodule on BeOS. |
| 60 | + REALLIBRARY=../libpython$(VERSION).so |
92 | 61 |
|
93 | | -7) Make: |
| 62 | +6) Make: |
94 | 63 |
|
95 | | - make |
96 | | - |
97 | | - or, if you feel the need for speed: |
98 | | - |
99 | | - make OPT="-O7 -opt schedule604" |
| 64 | + make AR=$(pwd)/BeOS/ar-fake RANLIB=: OPT=-DUSE_DL_EXPORT \ |
| 65 | + CCSHARED=-UUSE_DL_EXPORT |
100 | 66 |
|
101 | | - You can safely ignore any warnings you see during the build (and you'll |
102 | | - see several if you use full warnings; I compiled the distribution with |
103 | | - -w9 -ansi strict and cleaned up any errors...). |
| 67 | +7) Test: |
104 | 68 |
|
105 | | -8) Test: |
106 | | - |
107 | | - make test |
| 69 | + make AR=$(pwd)/BeOS/ar-fake RANLIB=: OPT=-DUSE_DL_EXPORT \ |
| 70 | + CCSHARED=-UUSE_DL_EXPORT test |
108 | 71 |
|
109 | 72 | Expect the following errors: |
110 | 73 |
|
111 | | - test_builtin failed -- round(1000000000.0) |
112 | | - test_fcntl skipped -- an optional feature could not be imported |
113 | 74 | test_grp crashed -- exceptions.KeyError : getgrnam(): name not found |
114 | 75 | test_pwd failed -- Writing: 'fakename', expected: 'caught e' |
115 | 76 | test_socket crashed -- exceptions.AttributeError : SOCK_RAW |
116 | 77 |
|
117 | 78 | These are all due to either partial support for certain things (like |
118 | | - sockets), or valid differences between systems (like the round() |
119 | | - error; different CPUs represent floating point numbers differently, |
120 | | - which can cause minor rounding errors). |
121 | | - |
122 | | -9) Install: |
123 | | - |
124 | | - make install |
| 79 | + sockets), or valid differences between systems. |
125 | 80 |
|
126 | | -10) Enjoy! |
| 81 | + NOTE: On R4/x86, the pause() function is broken; expect the signal |
| 82 | + module test to crash Python! |
127 | 83 |
|
128 | | -NOTE |
| 84 | +8) Install: |
129 | 85 |
|
130 | | -If you're going to build your own C/C++-based Python modules, link them |
131 | | -against the libpython1.5.so shared library (in /boot/home/config/lib) |
132 | | -instead of the libpython1.5.a (in /boot/home/config/lib/python1.5/config), |
133 | | -unless you're building a statically-linked python interpreter (then you |
134 | | -could try linking against _APP_ instead). |
| 86 | + make AR=$(pwd)/BeOS/ar-fake RANLIB=: OPT=-DUSE_DL_EXPORT \ |
| 87 | + CCSHARED=-UUSE_DL_EXPORT install |
135 | 88 |
|
136 | | -Mixing modules linked against the shared library with a statically-linked |
137 | | -interpreter is a bad idea (and it'll fail in _interesting_ ways). |
| 89 | +9) Enjoy! |
138 | 90 |
|
139 | 91 | - Chris Herborth ( [email protected]) |
140 | | - April 25, 1998 |
| 92 | + December 17, 1998 |
0 commit comments