# HG changeset patch # User Dirkjan Ochtman # Date 1299931323 -3600 # Node ID 64a458707fd413709a9cae49a87c722795a6a641 # Parent e42d18538e1d28e68f0b2cbd50f661501e49aa07 setup.py: use StrictVersion instead of manual comparison diff -r e42d18538e1d -r 64a458707fd4 setup.py --- 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',