]> granicus.if.org Git - python/commitdiff
Fix for issue #9164: with this patch sysconfig and distuls don't break
authorRonald Oussoren <ronaldoussoren@mac.com>
Sun, 11 Jul 2010 08:52:52 +0000 (08:52 +0000)
committerRonald Oussoren <ronaldoussoren@mac.com>
Sun, 11 Jul 2010 08:52:52 +0000 (08:52 +0000)
when duplicate '-arch foo' flags end up in CFLAGS (which may happen when
building a universal build using macports)

Lib/distutils/util.py
Lib/sysconfig.py
Misc/NEWS

index b3ec6e9606a70b2bc77ad7685f50625d78252b8d..4dcfeb550525d021faa0321fd7e67bd2cd44443b 100644 (file)
@@ -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]
index bbe331e02d32c5a449137005be92e6fc8f6f0d04..4559cd712ae1805f74390a7a7ceaa0dd0bd7bf02 100644 (file)
@@ -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]
index 86e295ef5966a76d42a6447613c30242c594c0dc..6235d875682be49cb5c14711f2e6c36d539ba28a 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -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
 -----------------