Commit d8482056 authored by Robert Bradshaw's avatar Robert Bradshaw

Some fixes for OS X 10.6

parent 29bb8d51
...@@ -18,6 +18,7 @@ py_include_dirs = [ ...@@ -18,6 +18,7 @@ py_include_dirs = [
"/Library/Frameworks/Python.framework/Versions/%s/Headers" % version_string "/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. # 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. # 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 # 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. ...@@ -28,12 +29,14 @@ leopard_python_prefix = '/System/Library/Frameworks/Python.framework/Versions/2.
full_version = "%s.%s.%s" % sys.version_info[:3] full_version = "%s.%s.%s" % sys.version_info[:3]
if python_prefix == leopard_python_prefix and full_version == '2.5.1': if python_prefix == leopard_python_prefix and full_version == '2.5.1':
os.environ["MACOSX_DEPLOYMENT_TARGET"] = "10.5" os.environ["MACOSX_DEPLOYMENT_TARGET"] = "10.5"
elif osx_version >= "10.6":
os.environ["MACOSX_DEPLOYMENT_TARGET"] = "10.4"
else: else:
os.environ["MACOSX_DEPLOYMENT_TARGET"] = "10.3" os.environ["MACOSX_DEPLOYMENT_TARGET"] = "10.3"
compilers = ["gcc", "g++"] compilers = ["gcc", "g++"]
compiler_options = \ 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 " \ "-mno-fused-madd -fno-common -dynamic " \
.split() .split()
if gcc_pendantic: if gcc_pendantic:
......
...@@ -5,7 +5,7 @@ PYTHON := /Local/Build/Pythonic/python/2.3 ...@@ -5,7 +5,7 @@ PYTHON := /Local/Build/Pythonic/python/2.3
INCLUDE := -I$(PYTHON) -I$(PYTHON)/Include -I$(PYTHON)/Mac/Include 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 -mno-fused-madd -fno-common -dynamic
LDOPTS := -Wl,-F.,-w -bundle -framework Python -framework Carbon LDOPTS := -Wl,-F.,-w -bundle -framework Python -framework Carbon
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment