diff options
author | Ronald Oussoren <ronaldoussoren@mac.com> | 2010-07-11 08:52:52 (GMT) |
---|---|---|
committer | Ronald Oussoren <ronaldoussoren@mac.com> | 2010-07-11 08:52:52 (GMT) |
commit | 7595620105bbdea61541fb24d8bc9dca4c9bb235 (patch) | |
tree | bc69d441004129809d3a32aa900321339db8ab57 | |
parent | e940c5d7df3be2ea63086f160b0c259b673749bf (diff) | |
download | cpython-7595620105bbdea61541fb24d8bc9dca4c9bb235.zip cpython-7595620105bbdea61541fb24d8bc9dca4c9bb235.tar.gz cpython-7595620105bbdea61541fb24d8bc9dca4c9bb235.tar.bz2 |
Fix for issue #9164: with this patch sysconfig and distuls don't break
when duplicate '-arch foo' flags end up in CFLAGS (which may happen when
building a universal build using macports)
-rw-r--r-- | Lib/distutils/util.py | 3 | ||||
-rw-r--r-- | Lib/sysconfig.py | 3 | ||||
-rw-r--r-- | Misc/NEWS | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/Lib/distutils/util.py b/Lib/distutils/util.py index b3ec6e9..4dcfeb5 100644 --- a/Lib/distutils/util.py +++ b/Lib/distutils/util.py @@ -144,8 +144,7 @@ def get_platform (): cflags = get_config_vars().get('CFLAGS') archs = re.findall('-arch\s+(\S+)', cflags) - archs.sort() - archs = tuple(archs) + archs = tuple(sorted(set(archs))) if len(archs) == 1: machine = archs[0] diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py index bbe331e..4559cd7 100644 --- a/Lib/sysconfig.py +++ b/Lib/sysconfig.py @@ -645,8 +645,7 @@ def get_platform(): cflags = get_config_vars().get('CFLAGS') archs = re.findall('-arch\s+(\S+)', cflags) - archs.sort() - archs = tuple(archs) + archs = tuple(sorted(set(archs))) if len(archs) == 1: machine = archs[0] @@ -33,6 +33,8 @@ Library - Issue #9128: Fix validation of class decorators in parser module. +- Issue #9164: Ensure sysconfig handles dupblice archs while building on OSX + Extension Modules ----------------- |