From 2af4ce8f3009d728d1c17758468de14920821b3d Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Tue, 9 Dec 2003 14:51:21 +0000 Subject: Made this module compatible with Python2.3, and added a temporary setup script that allows it to be built for that Python. --- Mac/Modules/launch/_Launchmodule.c | 4 ++++ Mac/Modules/launch/launchsupport.py | 4 ++++ Mac/Modules/launch/setup.py | 13 +++++++++++++ 3 files changed, 21 insertions(+) create mode 100644 Mac/Modules/launch/setup.py diff --git a/Mac/Modules/launch/_Launchmodule.c b/Mac/Modules/launch/_Launchmodule.c index 9180350..8e0d726 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 /* diff --git a/Mac/Modules/launch/launchsupport.py b/Mac/Modules/launch/launchsupport.py index 7816a46..122278c 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 /* diff --git a/Mac/Modules/launch/setup.py b/Mac/Modules/launch/setup.py new file mode 100644 index 0000000..4b101cf --- /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'} + ) -- cgit v0.12