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)
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 @@
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]