Skip to content

Commit 2af4ce8

Browse files
committed
Made this module compatible with Python2.3, and added a temporary setup
script that allows it to be built for that Python.
1 parent 1dde95d commit 2af4ce8

3 files changed

Lines changed: 21 additions & 0 deletions

File tree

Mac/Modules/launch/_Launchmodule.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@
1515
}} while(0)
1616

1717

18+
#if PY_VERSION_HEX < 0x02040000
19+
PyObject *PyMac_GetOSErrException(void);
20+
#endif
21+
1822
#include <ApplicationServices/ApplicationServices.h>
1923

2024
/*

Mac/Modules/launch/launchsupport.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@
2929
LSItemInfoRecord = OpaqueType("LSItemInfoRecord", "LSItemInfoRecord")
3030

3131
includestuff = includestuff + """
32+
#if PY_VERSION_HEX < 0x02040000
33+
PyObject *PyMac_GetOSErrException(void);
34+
#endif
35+
3236
#include <ApplicationServices/ApplicationServices.h>
3337
3438
/*

Mac/Modules/launch/setup.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# This is a temporary setup script to allow distribution of
2+
# MacPython 2.4 modules for MacPython 2.3.
3+
4+
from distutils.core import Extension, setup
5+
6+
setup(name="LaunchServices", version="0.1",
7+
ext_modules=[
8+
Extension('_Launch', ['_Launchmodule.c'],
9+
extra_link_args=['-framework', 'ApplicationServices'])
10+
],
11+
py_modules=['LaunchServices.Launch', 'LaunchServices.LaunchServices'],
12+
package_dir={'LaunchServices':'../../../Lib/plat-mac/Carbon'}
13+
)

0 commit comments

Comments
 (0)