Permalink
Browse files

OSX: Only compile for x86_64

  • Loading branch information...
1 parent b7e7ea1 commit ed112fac4726b57d111324915ab1e5f8808a3565 @dennda dennda committed Feb 13, 2011
Showing with 10 additions and 0 deletions.
  1. +10 −0 setup.py
View
@@ -139,6 +139,16 @@ def get_modulename_from_file(filename):
pyxl.pop(0)
return '.'.join(pyxl)
+ OrigExtension = Extension
+ def Extension(*args, **kwargs):
+ # Small hack to only compile for x86_64 on OSX.
+ # Is there a better way to do this?
+ if platform == 'darwin':
+ extra_args = ['-arch', 'x86_64']
+ kwargs['extra_compile_args'] = extra_args + kwargs.get('extra_compile_args', [])
+ kwargs['extra_link_args'] = extra_args + kwargs.get('extra_link_args', [])
+ return OrigExtension(*args, **kwargs)
+
# simple extensions
for pyx in (x for x in pyx_files if not 'graphics' in x):
module_name = get_modulename_from_file(pyx)

0 comments on commit ed112fa

Please sign in to comment.