summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRonald Oussoren <ronaldoussoren@mac.com>2006-10-08 17:49:52 (GMT)
committerRonald Oussoren <ronaldoussoren@mac.com>2006-10-08 17:49:52 (GMT)
commitd610369e8b63930b5a7b1bdafebd3c64af6b4b28 (patch)
tree16c0ca066be7f95b0cae95a4691984696c263584
parent3778bf526c7c5f9e54979abdc67294689eeee56f (diff)
downloadcpython-d610369e8b63930b5a7b1bdafebd3c64af6b4b28.zip
cpython-d610369e8b63930b5a7b1bdafebd3c64af6b4b28.tar.gz
cpython-d610369e8b63930b5a7b1bdafebd3c64af6b4b28.tar.bz2
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.
-rw-r--r--Lib/distutils/sysconfig.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
index c3b1e4e..0cfafab 100644
--- a/Lib/distutils/sysconfig.py
+++ b/Lib/distutils/sysconfig.py
@@ -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)