setup.py
branchstable
changeset 13594 64a458707fd4
parent 13583 e42d18538e1d
child 13619 fd09c3aeae20
child 13636 4bfff063aed6
--- a/setup.py	Sat Mar 12 12:42:20 2011 +0100
+++ b/setup.py	Sat Mar 12 13:02:03 2011 +0100
@@ -56,6 +56,7 @@
 from distutils.ccompiler import new_compiler
 from distutils.errors import CCompilerError
 from distutils.sysconfig import get_python_inc
+from distutils.version import StrictVersion
 
 scripts = ['hg']
 if os.name == 'nt':
@@ -379,7 +380,7 @@
     version = runcmd(['/usr/bin/xcodebuild', '-version'], {}).splitlines()[0]
     # Also parse only first digit, because 3.2.1 can't be parsed nicely
     if (version.startswith('Xcode') and
-        int(version.split()[1].split('.')[0]) >= 4):
+        StrictVersion(version.split()[1]) >= StrictVersion('4.0')):
         os.environ['ARCHFLAGS'] = '-arch i386 -arch x86_64'
 
 setup(name='mercurial',