MacOSX: distutils changes the values of BASECFLAGS and LDFLAGS when using a

universal build of python on OSX 10.3 to ensure that those flags can be used
to compile code (the universal build uses compiler flags that aren't supported
on 10.3). This patches gives the same treatment to CFLAGS, PY_CFLAGS and
BLDSHARED.
This commit is contained in:
Ronald Oussoren 2006-10-08 17:49:52 +00:00
parent 3778bf526c
commit d610369e8b
1 changed files with 4 additions and 1 deletions

View File

@ -509,7 +509,10 @@ 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',
# a number of derived variables. These need to be
# patched up as well.
'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'):
flags = _config_vars[key]
flags = re.sub('-arch\s+\w+\s', ' ', flags)
flags = re.sub('-isysroot [^ \t]*', ' ', flags)