Author ronaldoussoren
Recipients ronaldoussoren, srid, tarek
Date 2010-08-17.20:06:39
SpamBayes Score 6.14999e-06
Marked as misclassified No
Message-id <1282075602.41.0.281650322585.issue9516@psf.upfronthosting.co.za>
In-reply-to
Content
This (untested) patch should fix the issue:


Index: Lib/sysconfig.py
===================================================================
--- Lib/sysconfig.py	(revision 84147)
+++ Lib/sysconfig.py	(working copy)
@@ -295,9 +295,8 @@
             cur_target = cfg_target
             os.putenv('MACOSX_DEPLOYMENT_TARGET', cfg_target)
         elif map(int, cfg_target.split('.')) > map(int, cur_target.split('.')):
-            msg = ('$MACOSX_DEPLOYMENT_TARGET mismatch: now "%s" but "%s" '
-                   'during configure' % (cur_target, cfg_target))
-            raise IOError(msg)
+            os.putenv('MACOSX_DEPLOYMENT_TARGET', cfg_target)
+            cfg_target = cur_target
 
     # On AIX, there are wrong paths to the linker scripts in the Makefile
     # -- these paths are relative to the Python source, but when installed


This removes the exception, and instead replaces the incompatible environment setting by the configured setting.

It might be better to just have:

Index: Lib/sysconfig.py
===================================================================
--- Lib/sysconfig.py	(revision 84147)
+++ Lib/sysconfig.py	(working copy)
@@ -291,13 +291,8 @@
     if sys.platform == 'darwin' and 'MACOSX_DEPLOYMENT_TARGET' in vars:
         cfg_target = vars['MACOSX_DEPLOYMENT_TARGET']
         cur_target = os.getenv('MACOSX_DEPLOYMENT_TARGET', '')
-        if cur_target == '':
-            cur_target = cfg_target
+        if cur_target != cfg_target:
             os.putenv('MACOSX_DEPLOYMENT_TARGET', cfg_target)
-        elif map(int, cfg_target.split('.')) > map(int, cur_target.split('.')):
-            msg = ('$MACOSX_DEPLOYMENT_TARGET mismatch: now "%s" but "%s" '
-                   'during configure' % (cur_target, cfg_target))
-            raise IOError(msg)
 
     # On AIX, there are wrong paths to the linker scripts in the Makefile
     # -- these paths are relative to the Python source, but when installed


This entirely ignores the environment variable and always uses the value that was present during the configure run.
History
Date User Action Args
2010-08-17 20:06:42ronaldoussorensetrecipients: + ronaldoussoren, tarek, srid
2010-08-17 20:06:42ronaldoussorensetmessageid: <1282075602.41.0.281650322585.issue9516@psf.upfronthosting.co.za>
2010-08-17 20:06:40ronaldoussorenlinkissue9516 messages
2010-08-17 20:06:40ronaldoussorencreate