summaryrefslogtreecommitdiff
path: root/FantomModule
diff options
context:
space:
mode:
authorTat-Chee Wan (USM)2011-03-01 16:59:50 +0800
committerTat-Chee Wan (USM)2011-03-01 16:59:50 +0800
commit2234d3c1cae095a3a450e7c5bbf0c7b89bb6c346 (patch)
treed7ef988b14dfd316c3cb30367d260a54c39dafc1 /FantomModule
parent4ca74ae715848ddc6cb3272a8b2c655240d70180 (diff)
updated to handle fantom i386 only lib issue, framework linking
Diffstat (limited to 'FantomModule')
-rw-r--r--FantomModule/setup.py9
1 files 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",