summaryrefslogtreecommitdiff
path: root/Mac/Modules
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2003-12-09 14:51:21 +0000
committerJack Jansen <jack.jansen@cwi.nl>2003-12-09 14:51:21 +0000
commit0ca70c71afabb815f93988bc946af5db9e50163d (patch)
tree988a4ec36d9324b8bc4c1ed33183a7000d97597b /Mac/Modules
parent27218168eeaec91359a05b445970fec35eeb5987 (diff)
downloadcpython-0ca70c71afabb815f93988bc946af5db9e50163d.tar.gz
Made this module compatible with Python2.3, and added a temporary setup
script that allows it to be built for that Python.
Diffstat (limited to 'Mac/Modules')
-rw-r--r--Mac/Modules/launch/_Launchmodule.c4
-rw-r--r--Mac/Modules/launch/launchsupport.py4
-rw-r--r--Mac/Modules/launch/setup.py13
3 files changed, 21 insertions, 0 deletions
diff --git a/Mac/Modules/launch/_Launchmodule.c b/Mac/Modules/launch/_Launchmodule.c
index 9180350bd5..8e0d72630f 100644
--- a/Mac/Modules/launch/_Launchmodule.c
+++ b/Mac/Modules/launch/_Launchmodule.c
@@ -15,6 +15,10 @@
}} while(0)
+#if PY_VERSION_HEX < 0x02040000
+PyObject *PyMac_GetOSErrException(void);
+#endif
+
#include <ApplicationServices/ApplicationServices.h>
/*
diff --git a/Mac/Modules/launch/launchsupport.py b/Mac/Modules/launch/launchsupport.py
index 7816a46410..122278ca19 100644
--- a/Mac/Modules/launch/launchsupport.py
+++ b/Mac/Modules/launch/launchsupport.py
@@ -29,6 +29,10 @@ OptCFStringRef = OpaqueByValueType("CFStringRef", "OptCFStringRefObj")
LSItemInfoRecord = OpaqueType("LSItemInfoRecord", "LSItemInfoRecord")
includestuff = includestuff + """
+#if PY_VERSION_HEX < 0x02040000
+PyObject *PyMac_GetOSErrException(void);
+#endif
+
#include <ApplicationServices/ApplicationServices.h>
/*
diff --git a/Mac/Modules/launch/setup.py b/Mac/Modules/launch/setup.py
new file mode 100644
index 0000000000..4b101cf472
--- /dev/null
+++ b/Mac/Modules/launch/setup.py
@@ -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="LaunchServices", version="0.1",
+ ext_modules=[
+ Extension('_Launch', ['_Launchmodule.c'],
+ extra_link_args=['-framework', 'ApplicationServices'])
+ ],
+ py_modules=['LaunchServices.Launch', 'LaunchServices.LaunchServices'],
+ package_dir={'LaunchServices':'../../../Lib/plat-mac/Carbon'}
+ )