[Numpy-discussion] numscons/numpy.distutils bug related to MACOSX_DEPLOYMENT_TARGET

Brian Granger ellisonbg.net at gmail.com
Tue Feb 3 19:34:48 EST 2009


> What is the fix you are thinking of?

This is how Cython currently handles this logic.  This would have to
be modified to include the additional case of a user setting
MACOSX_DEPLOYMENT_TARGET in their environment, but that logic is
already in numpy.distutils.fcompiler.gnu.get_flags_linker_so

This is really just a special case for 1) OS X 10.5 and 2) built-in Python.

# 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
# Python to 2.5.2, this fix should be OK.
import distutils.sysconfig as sc
python_prefix = sc.get_config_var('prefix')
leopard_python_prefix =
'/System/Library/Frameworks/Python.framework/Versions/2.5'
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"
else:
    os.environ["MACOSX_DEPLOYMENT_TARGET"] = "10.3"



More information about the NumPy-Discussion mailing list