Some fixes for OS X 10.6
authorRobert Bradshaw <robertwb@math.washington.edu>
Tue, 22 Sep 2009 09:12:13 +0000 (02:12 -0700)
committerRobert Bradshaw <robertwb@math.washington.edu>
Tue, 22 Sep 2009 09:12:13 +0000 (02:12 -0700)
Cython/Mac/DarwinSystem.py
Cython/Mac/Makefile

index 23156e44fecca794d7add7380a5078627ff45881..8e2c63a53bcd1b0d71c2ae023878843937faf09e 100644 (file)
@@ -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:
index a7ca34b309cf8d0272fd5fb6de54325b21518c91..4e63e806170d09895c9e9aeded4d5425d2fde6a0 100644 (file)
@@ -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