comparison setup.py @ 13583:e42d18538e1d stable

fix compiling of extensions for OS X and XCode 4.0
author Alexander Solovyov <alexander@solovyov.net>
date Sat, 12 Mar 2011 12:42:20 +0100
parents 14f3795a5ed7
children 64a458707fd4
comparison
equal deleted inserted replaced
13581:b30a488762e1 13583:e42d18538e1d
371 if os.name == 'nt': 371 if os.name == 'nt':
372 # Windows binary file versions for exe/dll files must have the 372 # Windows binary file versions for exe/dll files must have the
373 # form W.X.Y.Z, where W,X,Y,Z are numbers in the range 0..65535 373 # form W.X.Y.Z, where W,X,Y,Z are numbers in the range 0..65535
374 setupversion = version.split('+', 1)[0] 374 setupversion = version.split('+', 1)[0]
375 375
376 if sys.platform == 'darwin' and os.path.exists('/usr/bin/xcodebuild'):
377 # XCode 4.0 dropped support for ppc architecture, which is hardcoded in
378 # distutils.sysconfig
379 version = runcmd(['/usr/bin/xcodebuild', '-version'], {}).splitlines()[0]
380 # Also parse only first digit, because 3.2.1 can't be parsed nicely
381 if (version.startswith('Xcode') and
382 int(version.split()[1].split('.')[0]) >= 4):
383 os.environ['ARCHFLAGS'] = '-arch i386 -arch x86_64'
384
376 setup(name='mercurial', 385 setup(name='mercurial',
377 version=setupversion, 386 version=setupversion,
378 author='Matt Mackall', 387 author='Matt Mackall',
379 author_email='mpm@selenic.com', 388 author_email='mpm@selenic.com',
380 url='http://mercurial.selenic.com/', 389 url='http://mercurial.selenic.com/',