From 75f6650879e7b75aec18cb9f4fbaed7f87f30027 Mon Sep 17 00:00:00 2001 From: John Wiggins Date: Sun, 17 Jun 2012 16:37:22 -0500 Subject: [PATCH] Update the Kiva build scripts to ignore Carbon for 64-bit builds. --- kiva/agg/setup.py | 12 +++++++----- kiva/quartz/setup.py | 4 +++- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/kiva/agg/setup.py b/kiva/agg/setup.py index aed7b58f4..5fa732920 100644 --- a/kiva/agg/setup.py +++ b/kiva/agg/setup.py @@ -102,7 +102,7 @@ def get_ft2_sources((lib_name, build_info), build_dir): ft2_incl_dirs = ['freetype2/src/' + s for s in freetype2_dirs] \ + ['freetype2/include', 'freetype2/src'] ft2_incl_dirs = config.paths(*ft2_incl_dirs) - if sys.platform == 'darwin': + if sys.platform == 'darwin' and '64bit' not in platform.architecture(): ft2_incl_dirs.append("/Developer/Headers/FlatCarbon") config.add_library(freetype_lib, @@ -179,14 +179,16 @@ def get_ft2_sources((lib_name, build_info), build_dir): define_macros.append(("ALWAYS_32BIT_WORKAROUND", 1)) # Options to make OS X link OpenGL + if '64bit' in platform.architecture(): + darwin_frameworks = ['Carbon', 'ApplicationServices', 'OpenGL'] + else: + darwin_frameworks = ['ApplicationServices', 'OpenGL'] darwin_opengl_opts = dict( include_dirs = [ '/System/Library/Frameworks/%s.framework/Versions/A/Headers' % x - for x in ['Carbon', 'ApplicationServices', 'OpenGL']], + for x in darwin_frameworks], define_macros = [('__DARWIN__',None)], - extra_link_args = - ['-framework %s' % x - for x in ['Carbon', 'ApplicationServices', 'OpenGL']] + extra_link_args = ['-framework %s' % x for x in darwin_frameworks] ) build_info = {} diff --git a/kiva/quartz/setup.py b/kiva/quartz/setup.py index a40c76577..b785297c4 100644 --- a/kiva/quartz/setup.py +++ b/kiva/quartz/setup.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os +import platform import sys def configuration(parent_package='', top_path=None): @@ -57,7 +58,8 @@ def generate_c_from_cython(extension, build_dir): ) wx_info = get_info('wx') - if wx_info: + if wx_info and '64bit' not in platform.architecture(): + # Avoid WX on 64-bit due to immature cocoa support # Find the release number of wx. wx_release = '2.6' for macro, value in wx_info['define_macros']: