blob: 989995ad6ebca1b364ab6cb9f7b0c2e1ea3ebd1e [file] [log] [blame]
Guido van Rossumfc4966b1998-12-17 18:00:33 +00001Python 1.5.x (x > 1) for BeOS
Guido van Rossumd8eb2111998-08-04 17:57:28 +00002
3This directory contains several useful things to help you build your own
4version of Python for BeOS.
5
Guido van Rossumd8eb2111998-08-04 17:57:28 +00006What's Here?
7
Guido van Rossumfc4966b1998-12-17 18:00:33 +00008ar-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 Rossumd8eb2111998-08-04 17:57:28 +000010
Guido van Rossum7a5f4201999-01-12 20:30:23 +000011dl_export.h - A header defining the evil magic declaration decorations
12 required for dynamic loading.
13
Guido van Rossumd8eb2111998-08-04 17:57:28 +000014linkcc - A shell script used by the build process to build the Python
15 shared library.
16
17linkmodule - 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 Rossumd8eb2111998-08-04 17:57:28 +000022README - This file (obviously!).
23
24README.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
32Compiling Your Own Version
33
Guido van Rossumfc4966b1998-12-17 18:00:33 +000034To compile your own version of Python 1.5.x for BeOS (with any luck,
35Python 1.5.2 and later will compile "out of the box" on BeOS), try this:
Guido van Rossumd8eb2111998-08-04 17:57:28 +000036
Guido van Rossumfc4966b1998-12-17 18:00:33 +0000371) Get the latest Python source code from ftp.python.org.
Guido van Rossumd8eb2111998-08-04 17:57:28 +000038
Guido van Rossumfc4966b1998-12-17 18:00:33 +0000392) Configure with:
Guido van Rossumd8eb2111998-08-04 17:57:28 +000040
Guido van Rossum7a5f4201999-01-12 20:30:23 +000041 ./configure --verbose --prefix=/boot/home/config --with-thread
Guido van Rossumeb452321998-12-18 22:00:58 +000042
Guido van Rossumfc4966b1998-12-17 18:00:33 +0000433) Copy Modules/Setup.in to Modules/Setup.
Guido van Rossumd8eb2111998-08-04 17:57:28 +000044
Guido van Rossumfc4966b1998-12-17 18:00:33 +0000454) Edit Modules/Setup to turn on all the modules you want built.
Guido van Rossumd8eb2111998-08-04 17:57:28 +000046
Guido van Rossumd8eb2111998-08-04 17:57:28 +000047 Make sure you use _socket instead of socket for the name of the
48 socketmodule on BeOS.
49
Guido van Rossumfc4966b1998-12-17 18:00:33 +000050 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 Rossumd8eb2111998-08-04 17:57:28 +000053
Guido van Rossum343848b1998-12-22 13:35:29 +000054 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 Rossum7a5f4201999-01-12 20:30:23 +000060
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 Rossum343848b1998-12-22 13:35:29 +000065
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000665) Make:
Guido van Rossumd8eb2111998-08-04 17:57:28 +000067
Guido van Rossum7a5f4201999-01-12 20:30:23 +000068 make
Guido van Rossumd8eb2111998-08-04 17:57:28 +000069
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000706) Test:
Guido van Rossumfc4966b1998-12-17 18:00:33 +000071
Guido van Rossum7a5f4201999-01-12 20:30:23 +000072 make test
Guido van Rossumd8eb2111998-08-04 17:57:28 +000073
74 Expect the following errors:
75
Guido van Rossumd8eb2111998-08-04 17:57:28 +000076 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 Rossumfc4966b1998-12-17 18:00:33 +000081 sockets), or valid differences between systems.
Guido van Rossumd8eb2111998-08-04 17:57:28 +000082
Guido van Rossumfc4966b1998-12-17 18:00:33 +000083 NOTE: On R4/x86, the pause() function is broken; expect the signal
84 module test to crash Python!
Guido van Rossumd8eb2111998-08-04 17:57:28 +000085
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000867) Install:
Guido van Rossumd8eb2111998-08-04 17:57:28 +000087
Guido van Rossum7a5f4201999-01-12 20:30:23 +000088 make install
Guido van Rossumd8eb2111998-08-04 17:57:28 +000089
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000908) Enjoy!
Guido van Rossumeb452321998-12-18 22:00:58 +000091
Guido van Rossum7a5f4201999-01-12 20:30:23 +000092- Chris Herborth (chrish@beoscentral.com)
93 January 12, 1999