From edeea04bfd8342c5339cea701d9c6c08186a1cdb Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Sun, 9 Dec 2001 23:08:54 +0000 Subject: Mods to make WASTE module compile and link for MachoPython. Not tested any further, yet. --- Mac/Wastemods/WEObjectHandlers.h | 4 +++- Mac/Wastemods/WETabHooks.h | 3 +++ Mac/Wastemods/WETabs.c | 2 +- Mac/Wastemods/WETabs.h | 3 +++ setup.py | 20 +++++++++++++++++++- 5 files changed, 29 insertions(+), 3 deletions(-) diff --git a/Mac/Wastemods/WEObjectHandlers.h b/Mac/Wastemods/WEObjectHandlers.h index d73a490..ac6e567 100644 --- a/Mac/Wastemods/WEObjectHandlers.h +++ b/Mac/Wastemods/WEObjectHandlers.h @@ -5,7 +5,9 @@ Copyright © 1993-1998 Marco Piovanelli All Rights Reserved */ - +#ifndef WITHOUT_FRAMEWORKS +#include +#endif #ifndef _WASTE_ #include "WASTE.h" #endif diff --git a/Mac/Wastemods/WETabHooks.h b/Mac/Wastemods/WETabHooks.h index 6405426..635db74 100644 --- a/Mac/Wastemods/WETabHooks.h +++ b/Mac/Wastemods/WETabHooks.h @@ -10,6 +10,9 @@ */ +#ifndef WITHOUT_FRAMEWORKS +#include +#endif #ifndef _WASTE_ #include "WASTE.h" #endif diff --git a/Mac/Wastemods/WETabs.c b/Mac/Wastemods/WETabs.c index 6f59e37..1a0291e 100644 --- a/Mac/Wastemods/WETabs.c +++ b/Mac/Wastemods/WETabs.c @@ -10,7 +10,7 @@ #include "WETabs.h" #include "WETabHooks.h" -#ifndef __ERRORS__ +#if !defined(__ERRORS__) && defined(WITHOUT_FRAMEWORKS) #include #endif diff --git a/Mac/Wastemods/WETabs.h b/Mac/Wastemods/WETabs.h index 4a91d7c..0b2c0f3 100644 --- a/Mac/Wastemods/WETabs.h +++ b/Mac/Wastemods/WETabs.h @@ -12,6 +12,9 @@ */ +#ifndef WITHOUT_FRAMEWORKS +#include +#endif #ifndef _WASTE_ #include "WASTE.h" #endif diff --git a/setup.py b/setup.py index 693d64c..bf1099c 100644 --- a/setup.py +++ b/setup.py @@ -634,7 +634,25 @@ class PyBuildExt(build_ext): ## exts.append( Extension('_Scrap', ['scrap/_Scrapmodule.c']) ) exts.append( Extension('_TE', ['te/_TEmodule.c'], extra_link_args=['-framework', 'Carbon']) ) -## exts.append( Extension('waste', ['waste/wastemodule.c']) ) + # As there is no standardized place (yet) to put user-installed + # Mac libraries on OSX you should put a symlink to your Waste + # installation in the same folder as your python source tree. + # Or modify the next two lines:-) + waste_incs = find_file("WASTE.h", [], ["../waste/C_C++ Headers"]) + waste_libs = find_library_file(self.compiler, "WASTE", [], + ["../waste/Static Libraries"]) + if waste_incs != None and waste_libs != None: + exts.append( Extension('waste', + ['waste/wastemodule.c', + 'Mac/Wastemods/WEObjectHandlers.c', + 'Mac/Wastemods/WETabHooks.c', + 'Mac/Wastemods/WETabs.c' + ], + include_dirs = waste_incs + ['Mac/Wastemods'], + library_dirs = waste_libs, + libraries = ['WASTE'], + extra_link_args = ['-framework', 'Carbon'], + ) ) exts.append( Extension('_Win', ['win/_Winmodule.c'], extra_link_args=['-framework', 'Carbon']) ) -- cgit v0.12