From: Robert Bradshaw Date: Tue, 22 Sep 2009 09:12:13 +0000 (-0700) Subject: Some fixes for OS X 10.6 X-Git-Tag: 0.11.3.rc0~8 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d8482056e8b00ecbe8338a396f7ce930dea42acb;p=cython.git Some fixes for OS X 10.6 --- diff --git a/Cython/Mac/DarwinSystem.py b/Cython/Mac/DarwinSystem.py index 23156e44..8e2c63a5 100644 --- a/Cython/Mac/DarwinSystem.py +++ b/Cython/Mac/DarwinSystem.py @@ -18,6 +18,7 @@ py_include_dirs = [ "/Library/Frameworks/Python.framework/Versions/%s/Headers" % version_string ] +osx_version = os.popen('sw_vers | grep ProductVersion').read().split()[1] # MACOSX_DEPLOYMENT_TARGET can be set to 10.3 in most cases. # But for the built-in Python 2.5.1 on Leopard, it needs to be set for 10.5. # This looks like a bug that will be fixed in 2.5.2. If Apple updates their @@ -28,12 +29,14 @@ leopard_python_prefix = '/System/Library/Frameworks/Python.framework/Versions/2. full_version = "%s.%s.%s" % sys.version_info[:3] if python_prefix == leopard_python_prefix and full_version == '2.5.1': os.environ["MACOSX_DEPLOYMENT_TARGET"] = "10.5" +elif osx_version >= "10.6": + os.environ["MACOSX_DEPLOYMENT_TARGET"] = "10.4" else: os.environ["MACOSX_DEPLOYMENT_TARGET"] = "10.3" compilers = ["gcc", "g++"] compiler_options = \ - "-g -c -fno-strict-aliasing -Wno-long-double -no-cpp-precomp " \ + "-g -c -fno-strict-aliasing -no-cpp-precomp " \ "-mno-fused-madd -fno-common -dynamic " \ .split() if gcc_pendantic: diff --git a/Cython/Mac/Makefile b/Cython/Mac/Makefile index a7ca34b3..4e63e806 100644 --- a/Cython/Mac/Makefile +++ b/Cython/Mac/Makefile @@ -5,7 +5,7 @@ PYTHON := /Local/Build/Pythonic/python/2.3 INCLUDE := -I$(PYTHON) -I$(PYTHON)/Include -I$(PYTHON)/Mac/Include -CCOPTS := -fno-strict-aliasing -Wno-long-double -no-cpp-precomp \ +CCOPTS := -fno-strict-aliasing -no-cpp-precomp \ -mno-fused-madd -fno-common -dynamic LDOPTS := -Wl,-F.,-w -bundle -framework Python -framework Carbon