]> granicus.if.org Git - python/commitdiff
Fix an issue with the detection of a non-existing SDK
authorRonald Oussoren <ronaldoussoren@mac.com>
Thu, 10 Dec 2009 10:27:09 +0000 (10:27 +0000)
committerRonald Oussoren <ronaldoussoren@mac.com>
Thu, 10 Dec 2009 10:27:09 +0000 (10:27 +0000)
on OSX. Without this patch it wasn't possible after all
to compile extensions on OSX 10.6 with the binary
installer unless the user had installed the (non-default)
10.4u SDK.

Lib/distutils/sysconfig.py

index 6ca6720adbe519ba5d35d42f32562d45f42855c5..f3b2aca6132514194dcf18f8da51dec5283c3459 100644 (file)
@@ -563,7 +563,7 @@ def get_config_vars(*args):
                 # are in CFLAGS or LDFLAGS and remove them if they are.
                 # This is needed when building extensions on a 10.3 system
                 # using a universal build of python.
-                for key in ('LDFLAGS', 'BASECFLAGS',
+                for key in ('LDFLAGS', 'BASECFLAGS', 'LDSHARED',
                         # a number of derived variables. These need to be
                         # patched up as well.
                         'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'):
@@ -582,7 +582,7 @@ def get_config_vars(*args):
 
                 if 'ARCHFLAGS' in os.environ:
                     arch = os.environ['ARCHFLAGS']
-                    for key in ('LDFLAGS', 'BASECFLAGS',
+                    for key in ('LDFLAGS', 'BASECFLAGS', 'LDSHARED',
                         # a number of derived variables. These need to be
                         # patched up as well.
                         'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'):
@@ -606,7 +606,7 @@ def get_config_vars(*args):
                 if m is not None:
                     sdk = m.group(1)
                     if not os.path.exists(sdk):
-                        for key in ('LDFLAGS', 'BASECFLAGS',
+                        for key in ('LDFLAGS', 'BASECFLAGS', 'LDSHARED',
                              # a number of derived variables. These need to be
                              # patched up as well.
                             'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'):