]> granicus.if.org Git - python/commitdiff
Make this module Python 2.3 compatible, and add a setup script that allows
authorJack Jansen <jack.jansen@cwi.nl>
Tue, 9 Dec 2003 15:06:18 +0000 (15:06 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Tue, 9 Dec 2003 15:06:18 +0000 (15:06 +0000)
it to be built for that python.

Mac/Modules/osa/_OSAmodule.c
Mac/Modules/osa/osasupport.py
Mac/Modules/osa/setup.py [new file with mode: 0644]

index aceded4c0205e468366e917a7f6fec83ec725d43..45e7baf1fedbb60fb57f047a39605ab5bff602d4 100644 (file)
@@ -15,6 +15,9 @@
     }} while(0)
 
 
+#if PY_VERSION_HEX < 0x02040000
+PyObject *PyMac_GetOSErrException(void);
+#endif
 #include <Carbon/Carbon.h>
 
 #ifdef USE_TOOLBOX_OBJECT_GLUE
index 7e702236064c8be1eb7dcb97f85d68b08b062ef3..fe320e8eb10f927e62a6b84b45c387b4d54d84f6 100644 (file)
@@ -20,6 +20,9 @@ from macsupport import *
 # Create the type objects
 
 includestuff = includestuff + """
+#if PY_VERSION_HEX < 0x02040000
+PyObject *PyMac_GetOSErrException(void);
+#endif
 #include <Carbon/Carbon.h>
 
 #ifdef USE_TOOLBOX_OBJECT_GLUE
diff --git a/Mac/Modules/osa/setup.py b/Mac/Modules/osa/setup.py
new file mode 100644 (file)
index 0000000..82e7742
--- /dev/null
@@ -0,0 +1,13 @@
+# This is a temporary setup script to allow distribution of
+# MacPython 2.4 modules for MacPython 2.3.
+
+from distutils.core import Extension, setup
+
+setup(name="OSA", version="0.1",
+       ext_modules=[
+               Extension('_OSA', ['_OSAmodule.c'],
+               extra_link_args=['-framework', 'Carbon'])
+       ],
+       py_modules=['OSA.OSA', 'OSA.OSAconst'],
+       package_dir={'OSA':'../../../Lib/plat-mac/Carbon'}
+       )