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:
parent
1dde95dffa
commit
2af4ce8f30
|
@ -15,6 +15,10 @@
|
|||
}} while(0)
|
||||
|
||||
|
||||
#if PY_VERSION_HEX < 0x02040000
|
||||
PyObject *PyMac_GetOSErrException(void);
|
||||
#endif
|
||||
|
||||
#include <ApplicationServices/ApplicationServices.h>
|
||||
|
||||
/*
|
||||
|
|
|
@ -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>
|
||||
|
||||
/*
|
||||
|
|
|
@ -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'}
|
||||
)
|
Loading…
Reference in New Issue