Made this module compatible with Python2.3, and added a temporary setup

script that allows it to be built for that Python.
This commit is contained in:
Jack Jansen 2003-12-09 14:51:21 +00:00
parent 1dde95dffa
commit 2af4ce8f30
3 changed files with 21 additions and 0 deletions

View File

@ -15,6 +15,10 @@
}} while(0)
#if PY_VERSION_HEX < 0x02040000
PyObject *PyMac_GetOSErrException(void);
#endif
#include <ApplicationServices/ApplicationServices.h>
/*

View File

@ -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>
/*

View File

@ -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'}
)