From 2234d3c1cae095a3a450e7c5bbf0c7b89bb6c346 Mon Sep 17 00:00:00 2001 From: Tat-Chee Wan (USM) Date: Tue, 1 Mar 2011 16:59:50 +0800 Subject: updated to handle fantom i386 only lib issue, framework linking --- FantomModule/setup.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/FantomModule/setup.py b/FantomModule/setup.py index 25dd152..e713d2f 100644 --- a/FantomModule/setup.py +++ b/FantomModule/setup.py @@ -1,16 +1,21 @@ from distutils.core import setup, Extension import sys +import os def getextensions(): mac_ext = Extension("FantomModule", define_macros=[('PYFANTOM_DEBUG', '0')], # set to '1' to print debug messges include_dirs=['.'], - extra_compile_args=['-arch i386'], - libraries=["Fantom"], + extra_compile_args=["-Wno-strict-prototypes"], + extra_link_args=["-framework Fantom"], sources=["FantomModule.cpp"] ) return [mac_ext] +# Must specify i386 arch via environment variable since Fantom libraries are i386 only +# Order of gcc flags is important, it can't be specified via Extension() module +os.environ['ARCHFLAGS'] = '-arch i386' + # install the main library setup(name="pyfantom", version="0.1", -- cgit v1.2.3