diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2003-12-09 15:06:18 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2003-12-09 15:06:18 (GMT) |
commit | 2e20a63bc98da51e1e8206f55a1a519a488e2659 (patch) | |
tree | ecb58f8e7fdf1d629a6d146a7704ddb21018f461 /Mac | |
parent | 2af4ce8f3009d728d1c17758468de14920821b3d (diff) | |
download | cpython-2e20a63bc98da51e1e8206f55a1a519a488e2659.zip cpython-2e20a63bc98da51e1e8206f55a1a519a488e2659.tar.gz cpython-2e20a63bc98da51e1e8206f55a1a519a488e2659.tar.bz2 |
Make this module Python 2.3 compatible, and add a setup script that allows
it to be built for that python.
Diffstat (limited to 'Mac')
-rw-r--r-- | Mac/Modules/osa/_OSAmodule.c | 3 | ||||
-rw-r--r-- | Mac/Modules/osa/osasupport.py | 3 | ||||
-rw-r--r-- | Mac/Modules/osa/setup.py | 13 |
3 files changed, 19 insertions, 0 deletions
diff --git a/Mac/Modules/osa/_OSAmodule.c b/Mac/Modules/osa/_OSAmodule.c index aceded4..45e7baf 100644 --- a/Mac/Modules/osa/_OSAmodule.c +++ b/Mac/Modules/osa/_OSAmodule.c @@ -15,6 +15,9 @@ }} while(0) +#if PY_VERSION_HEX < 0x02040000 +PyObject *PyMac_GetOSErrException(void); +#endif #include <Carbon/Carbon.h> #ifdef USE_TOOLBOX_OBJECT_GLUE diff --git a/Mac/Modules/osa/osasupport.py b/Mac/Modules/osa/osasupport.py index 7e70223..fe320e8 100644 --- a/Mac/Modules/osa/osasupport.py +++ b/Mac/Modules/osa/osasupport.py @@ -20,6 +20,9 @@ from macsupport import * # Create the type objects includestuff = includestuff + """ +#if PY_VERSION_HEX < 0x02040000 +PyObject *PyMac_GetOSErrException(void); +#endif #include <Carbon/Carbon.h> #ifdef USE_TOOLBOX_OBJECT_GLUE diff --git a/Mac/Modules/osa/setup.py b/Mac/Modules/osa/setup.py new file mode 100644 index 0000000..82e7742 --- /dev/null +++ b/Mac/Modules/osa/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="OSA", version="0.1", + ext_modules=[ + Extension('_OSA', ['_OSAmodule.c'], + extra_link_args=['-framework', 'Carbon']) + ], + py_modules=['OSA.OSA', 'OSA.OSAconst'], + package_dir={'OSA':'../../../Lib/plat-mac/Carbon'} + ) |