summaryrefslogtreecommitdiffstats
path: root/BeOS/README
blob: a4d6aee54873f8cb3595e0eb702cf440e8426f40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
Python 1.5.x (x > 1) for BeOS

This directory contains several useful things to help you build your own
version of Python for BeOS.

What's Here?

ar-fake - A shell script used by the build process to emulate a "real"
          POSIX ar command; helps to build the Python shared library.

linkcc - A shell script used by the build process to build the Python
         shared library.

linkmodule - A shell script used by the build process to build the
             shared library versions of the standard modules; you'll
             probably need this if you want to build dynamically loaded
             modules from the Python archives.

PyImport_BeImageID.html - Documentation for a function added to the
                          Python interpreter under BeOS; not interesting
                          unless you're writing your own BeOS-specific
                          modules for dealing with dynamically-loaded
                          Python modules.

README - This file (obviously!).

README.readline-2.2 - Instructions for compiling/installing GNU readline 2.2.
                      You'll have to grab the GNU readline source code from 
                      prep.ai.mit.edu:/pub/GNU or any other GNU mirror.

                      The Python interpreter is much nicer to work with
                      interactively if you've got readline installed.  Highly
                      recommended.

Compiling Your Own Version

To compile your own version of Python 1.5.x for BeOS (with any luck,
Python 1.5.2 and later will compile "out of the box" on BeOS), try this:

1) Get the latest Python source code from ftp.python.org.

2) Configure with:

   AR=$(pwd)/BeOS/ar-fake RANLIB=: ./configure --verbose --without-gcc \
   --prefix=/boot/home/config --with-thread
   
3) Copy Modules/Setup.in to Modules/Setup.

4) Edit Modules/Setup to turn on all the modules you want built.

   Make sure you use _socket instead of socket for the name of the
   socketmodule on BeOS.

   If you want the modules to be built as shared libraries, instead of as
   part of the Python shared library, be sure to uncomment the #*shared*
   line.

5) Make sure Modules/Makefile.pre has REALLIBRARY set to:

   REALLIBRARY=../libpython$(VERSION).so

6) Make:

   make AR=$(pwd)/BeOS/ar-fake RANLIB=: OPT=-DUSE_DL_EXPORT \
   CCSHARED=-UUSE_DL_EXPORT
   
7) Test:

   make AR=$(pwd)/BeOS/ar-fake RANLIB=: OPT=-DUSE_DL_EXPORT \
   CCSHARED=-UUSE_DL_EXPORT test

   Expect the following errors:

   test_grp crashed -- exceptions.KeyError : getgrnam(): name not found
   test_pwd failed -- Writing: 'fakename', expected: 'caught e'
   test_socket crashed -- exceptions.AttributeError : SOCK_RAW

   These are all due to either partial support for certain things (like
   sockets), or valid differences between systems.

   NOTE: On R4/x86, the pause() function is broken; expect the signal
         module test to crash Python!

8) Install:

   make AR=$(pwd)/BeOS/ar-fake RANLIB=: OPT=-DUSE_DL_EXPORT \
   CCSHARED=-UUSE_DL_EXPORT install

9) Enjoy!

- Chris Herborth (chrish@qnx.com)
  December 17, 1998