[Python-checkins] r45490 - python/trunk/Lib/distutils/sysconfig.py

ronald.oussoren python-checkins at python.org
Mon Apr 17 16:43:31 CEST 2006


Author: ronald.oussoren
Date: Mon Apr 17 16:43:30 2006
New Revision: 45490

Modified:
   python/trunk/Lib/distutils/sysconfig.py
Log:
disutils checks if MACOSX_DEPLOYMENT_TARGET is consistent with the value at
configure time. The current check is too strict and doesn't allow building
extensions that can only run on newer versions of the OS than the version
python was build for, that is python build for 10.3 or later and an extension
for 10.4. This patch relaxes this check.

This turned out to be a reimplementation of patch 1193190.


Modified: python/trunk/Lib/distutils/sysconfig.py
==============================================================================
--- python/trunk/Lib/distutils/sysconfig.py	(original)
+++ python/trunk/Lib/distutils/sysconfig.py	Mon Apr 17 16:43:30 2006
@@ -372,7 +372,7 @@
         if cur_target == '':
             cur_target = cfg_target
             os.putenv('MACOSX_DEPLOYMENT_TARGET', cfg_target)
-        if cfg_target != cur_target:
+        elif map(int, cfg_target.split('.')) > map(int, cur_target.split('.')):
             my_msg = ('$MACOSX_DEPLOYMENT_TARGET mismatch: now "%s" but "%s" during configure'
                 % (cur_target, cfg_target))
             raise DistutilsPlatformError(my_msg)


More information about the Python-checkins mailing list