Mercurial > hg
changeset 13594:64a458707fd4 stable
setup.py: use StrictVersion instead of manual comparison
author | Dirkjan Ochtman <dirkjan@ochtman.nl> |
---|---|
date | Sat, 12 Mar 2011 13:02:03 +0100 |
parents | e42d18538e1d |
children | 241380fcc402 270f57d35525 |
files | setup.py |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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',