blob: a4d6aee54873f8cb3595e0eb702cf440e8426f40 [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
11linkcc - A shell script used by the build process to build the Python
12 shared library.
13
14linkmodule - A shell script used by the build process to build the
15 shared library versions of the standard modules; you'll
16 probably need this if you want to build dynamically loaded
17 modules from the Python archives.
18
19PyImport_BeImageID.html - Documentation for a function added to the
20 Python interpreter under BeOS; not interesting
21 unless you're writing your own BeOS-specific
22 modules for dealing with dynamically-loaded
23 Python modules.
24
25README - This file (obviously!).
26
27README.readline-2.2 - Instructions for compiling/installing GNU readline 2.2.
28 You'll have to grab the GNU readline source code from
29 prep.ai.mit.edu:/pub/GNU or any other GNU mirror.
30
31 The Python interpreter is much nicer to work with
32 interactively if you've got readline installed. Highly
33 recommended.
34
35Compiling Your Own Version
36
Guido van Rossumfc4966b1998-12-17 18:00:33 +000037To compile your own version of Python 1.5.x for BeOS (with any luck,
38Python 1.5.2 and later will compile "out of the box" on BeOS), try this:
Guido van Rossumd8eb2111998-08-04 17:57:28 +000039
Guido van Rossumfc4966b1998-12-17 18:00:33 +0000401) Get the latest Python source code from ftp.python.org.
Guido van Rossumd8eb2111998-08-04 17:57:28 +000041
Guido van Rossumfc4966b1998-12-17 18:00:33 +0000422) Configure with:
Guido van Rossumd8eb2111998-08-04 17:57:28 +000043
Guido van Rossumfc4966b1998-12-17 18:00:33 +000044 AR=$(pwd)/BeOS/ar-fake RANLIB=: ./configure --verbose --without-gcc \
Guido van Rossumd8eb2111998-08-04 17:57:28 +000045 --prefix=/boot/home/config --with-thread
46
Guido van Rossumfc4966b1998-12-17 18:00:33 +0000473) Copy Modules/Setup.in to Modules/Setup.
Guido van Rossumd8eb2111998-08-04 17:57:28 +000048
Guido van Rossumfc4966b1998-12-17 18:00:33 +0000494) Edit Modules/Setup to turn on all the modules you want built.
Guido van Rossumd8eb2111998-08-04 17:57:28 +000050
Guido van Rossumd8eb2111998-08-04 17:57:28 +000051 Make sure you use _socket instead of socket for the name of the
52 socketmodule on BeOS.
53
Guido van Rossumfc4966b1998-12-17 18:00:33 +000054 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.
Guido van Rossumd8eb2111998-08-04 17:57:28 +000057
Guido van Rossumfc4966b1998-12-17 18:00:33 +0000585) Make sure Modules/Makefile.pre has REALLIBRARY set to:
Guido van Rossumd8eb2111998-08-04 17:57:28 +000059
Guido van Rossumfc4966b1998-12-17 18:00:33 +000060 REALLIBRARY=../libpython$(VERSION).so
Guido van Rossumd8eb2111998-08-04 17:57:28 +000061
Guido van Rossumfc4966b1998-12-17 18:00:33 +0000626) Make:
63
64 make AR=$(pwd)/BeOS/ar-fake RANLIB=: OPT=-DUSE_DL_EXPORT \
65 CCSHARED=-UUSE_DL_EXPORT
66
677) Test:
68
69 make AR=$(pwd)/BeOS/ar-fake RANLIB=: OPT=-DUSE_DL_EXPORT \
70 CCSHARED=-UUSE_DL_EXPORT test
Guido van Rossumd8eb2111998-08-04 17:57:28 +000071
72 Expect the following errors:
73
Guido van Rossumd8eb2111998-08-04 17:57:28 +000074 test_grp crashed -- exceptions.KeyError : getgrnam(): name not found
75 test_pwd failed -- Writing: 'fakename', expected: 'caught e'
76 test_socket crashed -- exceptions.AttributeError : SOCK_RAW
77
78 These are all due to either partial support for certain things (like
Guido van Rossumfc4966b1998-12-17 18:00:33 +000079 sockets), or valid differences between systems.
Guido van Rossumd8eb2111998-08-04 17:57:28 +000080
Guido van Rossumfc4966b1998-12-17 18:00:33 +000081 NOTE: On R4/x86, the pause() function is broken; expect the signal
82 module test to crash Python!
Guido van Rossumd8eb2111998-08-04 17:57:28 +000083
Guido van Rossumfc4966b1998-12-17 18:00:33 +0000848) Install:
Guido van Rossumd8eb2111998-08-04 17:57:28 +000085
Guido van Rossumfc4966b1998-12-17 18:00:33 +000086 make AR=$(pwd)/BeOS/ar-fake RANLIB=: OPT=-DUSE_DL_EXPORT \
87 CCSHARED=-UUSE_DL_EXPORT install
Guido van Rossumd8eb2111998-08-04 17:57:28 +000088
Guido van Rossumfc4966b1998-12-17 18:00:33 +0000899) Enjoy!
Guido van Rossumd8eb2111998-08-04 17:57:28 +000090
91- Chris Herborth (chrish@qnx.com)
Guido van Rossumfc4966b1998-12-17 18:00:33 +000092 December 17, 1998