]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
disutils checks if MACOSX_DEPLOYMENT_TARGET is consistent with the value at
authorRonald Oussoren <ronaldoussoren@mac.com>
Mon, 17 Apr 2006 14:43:30 +0000 (14:43 +0000)
committerRonald Oussoren <ronaldoussoren@mac.com>
Mon, 17 Apr 2006 14:43:30 +0000 (14:43 +0000)
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.

Lib/distutils/sysconfig.py

index 8d66cc2e7ee8f12005235a931f62e422968ba56b..72aa51170052167dd803df1ecfe9337709a2969c 100644 (file)
@@ -372,7 +372,7 @@ def _init_posix():
         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)