summaryrefslogtreecommitdiffstats
path: root/BeOS
diff options
context:
space:
mode:
Diffstat (limited to 'BeOS')
-rw-r--r--BeOS/README55
-rw-r--r--BeOS/dl_export.h50
2 files changed, 68 insertions, 37 deletions
diff --git a/BeOS/README b/BeOS/README
index a0f0dc8..989995a 100644
--- a/BeOS/README
+++ b/BeOS/README
@@ -8,6 +8,9 @@ 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.
+dl_export.h - A header defining the evil magic declaration decorations
+ required for dynamic loading.
+
linkcc - A shell script used by the build process to build the Python
shared library.
@@ -35,21 +38,7 @@ Python 1.5.2 and later will compile "out of the box" on BeOS), try this:
2) Configure with:
- AR=$(pwd)/BeOS/ar-fake RANLIB=: ./configure --verbose \
- --prefix=/boot/home/config --with-thread
-
- When configure is done, add this anywhere in config.h:
-
-#ifndef DL_EXPORT
-# define DL_EXPORT(RTYPE) __declspec(dllexport) RTYPE
-#endif
-#ifndef DL_IMPORT
-# ifdef USE_DL_EXPORT
-# define DL_IMPORT(RTYPE) __declspec(dllexport) RTYPE
-# else
-# define DL_IMPORT(RTYPE) __declspec(dllimport) RTYPE
-# endif
-#endif
+ ./configure --verbose --prefix=/boot/home/config --with-thread
3) Copy Modules/Setup.in to Modules/Setup.
@@ -68,22 +57,19 @@ Python 1.5.2 and later will compile "out of the box" on BeOS), try this:
operator _locale fcntl pwd grp select _socket errno crypt termios
audioop imageop rgbimg md5 timing rotor syslog curses new gdbm soundex
binascii parser cStringIO cPickle zlib
+
+ Note that some of these (readline, curses, gdbm, and zlib) require extra
+ libraries that aren't supplied with Python. If you don't have the extra
+ libs (you can probably get them from GeekGadgets), don't try to use
+ these modules; they won't compile.
-5) Make sure Modules/Makefile.pre has REALLIBRARY set to:
-
- REALLIBRARY=../libpython$(VERSION).so
+5) Make:
-6) Make:
+ make
- make OPT=-DUSE_DL_EXPORT CCSHARED=-UUSE_DL_EXPORT MACHDEP=beos
+6) Test:
- On PowerPC systems, you'll see lots of warnings about duplicate
- symbols when things get linked; don't worry about this, it's
- harmless (and should disappear soon).
-
-7) Test:
-
- make OPT=-DUSE_DL_EXPORT CCSHARED=-UUSE_DL_EXPORT MACHDEP=beos test
+ make test
Expect the following errors:
@@ -97,16 +83,11 @@ Python 1.5.2 and later will compile "out of the box" on BeOS), try this:
NOTE: On R4/x86, the pause() function is broken; expect the signal
module test to crash Python!
-8) Install:
-
- make OPT=-DUSE_DL_EXPORT CCSHARED=-UUSE_DL_EXPORT MACHDEP=beos nstall
+7) Install:
- This will fail trying to copy libpython1.5.a; at that point in the
- install, everything you "normally" need is installed (all the Python
- bits), and the stuff you need for compiling C-based modules is half-
- installed. This will be fixed before the 1.5.2 release.
+ make install
-9) Enjoy!
+8) Enjoy!
-- Chris Herborth (chrish@qnx.com)
- December 22, 1998
+- Chris Herborth (chrish@beoscentral.com)
+ January 12, 1999
diff --git a/BeOS/dl_export.h b/BeOS/dl_export.h
new file mode 100644
index 0000000..efe7f1e
--- /dev/null
+++ b/BeOS/dl_export.h
@@ -0,0 +1,50 @@
+#ifndef BEOS_DL_EXPORT_H
+#define BEOS_DL_EXPORT_H
+
+/* There are no declarations here, so no #ifdef __cplusplus...
+ *
+ * This is the nasty declaration decorations required by certain systems
+ * (in our case, BeOS) for dynamic object loading.
+ *
+ * This trivial header is released under the same license as the rest of
+ * Python:
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation for any purpose and without fee is hereby granted,
+ * provided that the above copyright notice appear in all copies and that
+ * both that copyright notice and this permission notice appear in
+ * supporting documentation, and that the names of Stichting Mathematisch
+ * Centrum or CWI or Corporation for National Research Initiatives or
+ * CNRI not be used in advertising or publicity pertaining to
+ * distribution of the software without specific, written prior
+ * permission.
+ *
+ * While CWI is the initial source for this software, a modified version
+ * is made available by the Corporation for National Research Initiatives
+ * (CNRI) at the Internet address ftp://ftp.python.org.
+ *
+ * STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH
+ * CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ *
+ * - Chris Herborth (chrish@beoscentral.com)
+ * January 11, 1999
+ */
+
+#ifndef DL_EXPORT
+# define DL_EXPORT(RTYPE) __declspec(dllexport) RTYPE
+#endif
+#ifndef DL_IMPORT
+# ifdef USE_DL_EXPORT
+# define DL_IMPORT(RTYPE) __declspec(dllexport) RTYPE
+# else
+# define DL_IMPORT(RTYPE) __declspec(dllimport) RTYPE
+# endif
+#endif
+
+#endif