Ronald Oussoren <[email protected]> added the comment:
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.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue9516>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com