[Numpy-svn] r3523 - trunk/numpy/distutils/fcompiler

numpy-svn at scipy.org numpy-svn at scipy.org
Tue Jan 30 14:18:10 EST 2007


Author: rkern
Date: 2007-01-30 13:18:06 -0600 (Tue, 30 Jan 2007)
New Revision: 3523

Modified:
   trunk/numpy/distutils/fcompiler/gnu.py
Log:
Revert semi-intelligent handling of MACOSX_DEPLOYMENT_TARGET to work around broken MacPorts Python.

Modified: trunk/numpy/distutils/fcompiler/gnu.py
===================================================================
--- trunk/numpy/distutils/fcompiler/gnu.py	2007-01-28 02:57:51 UTC (rev 3522)
+++ trunk/numpy/distutils/fcompiler/gnu.py	2007-01-30 19:18:06 UTC (rev 3523)
@@ -1,6 +1,5 @@
 import re
 import os
-import platform
 import sys
 import warnings
 
@@ -62,14 +61,16 @@
     def get_flags_linker_so(self):
         opt = self.linker_so[1:]
         if sys.platform=='darwin':
-            osx_version = platform.mac_ver()[0][:4]
-            osx_major, osx_minor = osx_version.split('.')
+            # MACOSX_DEPLOYMENT_TARGET must be at least 10.3. This is
+            # a reasonable default value even when building on 10.4 when using
+            # the official Python distribution and those derived from it (when
+            # not broken).
             target = os.environ.get('MACOSX_DEPLOYMENT_TARGET', None)
             if target is None or target == '':
-                target = osx_version
+                target = '10.3'
             major, minor = target.split('.')
             if int(minor) < 3:
-                minor = osx_minor
+                minor = '3'
                 warnings.warn('Environment variable '
                     'MACOSX_DEPLOYMENT_TARGET reset to %s.%s' % (major, minor))
             os.environ['MACOSX_DEPLOYMENT_TARGET'] = '%s.%s' % (major,




More information about the Numpy-svn mailing list