diff options
author | Stefan Behnel <stefan_ml@behnel.de> | 2012-07-30 11:16:49 +0200 |
---|---|---|
committer | Stefan Behnel <stefan_ml@behnel.de> | 2012-07-30 11:16:49 +0200 |
commit | c037f61ba81da8abb9b4852d0d0ba292754fcd67 (patch) | |
tree | ca97bd0054d92d75cf89d02a8706dc2ed381a68d /buildlibxml.py | |
parent | 7e8c247d6b8032996fe7a96b1434c641de6131fa (diff) | |
download | python-lxml-c037f61ba81da8abb9b4852d0d0ba292754fcd67.tar.gz |
code cleanup
Diffstat (limited to 'buildlibxml.py')
-rw-r--r-- | buildlibxml.py | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/buildlibxml.py b/buildlibxml.py index 0b42666e..76509e5f 100644 --- a/buildlibxml.py +++ b/buildlibxml.py @@ -285,19 +285,19 @@ def build_libxml2xslt(download_dir, build_dir, env_setup = None if sys.platform == 'darwin': import platform - # We compile Universal if we are on a machine > 10.3 + # check target architectures on MacOS-X (ppc, i386, x86_64) major_version, minor_version = tuple(map(int, platform.mac_ver()[0].split('.')[:2])) - # Check to see if ppc is supported (XCode4 drops ppc support) - include_ppc = True - if os.path.exists('/usr/bin/xcodebuild'): - pipe = subprocess.Popen(['/usr/bin/xcodebuild', '-version'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) - out, err = pipe.communicate() - xcode_version = out.splitlines()[0] - # Also parse only first digit, because 3.2.1 can't be parsed nicely - if (xcode_version.startswith('Xcode') and - version.StrictVersion(xcode_version.split()[1]) >= version.StrictVersion('4.0')): - include_ppc = False if major_version > 7: + # Check to see if ppc is supported (XCode4 drops ppc support) + include_ppc = True + if os.path.exists('/usr/bin/xcodebuild'): + pipe = subprocess.Popen(['/usr/bin/xcodebuild', '-version'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) + out, err = pipe.communicate() + xcode_version = out.splitlines()[0] + # Also parse only first digit, because 3.2.1 can't be parsed nicely + if (xcode_version.startswith('Xcode') and + version.StrictVersion(xcode_version.split()[1]) >= version.StrictVersion('4.0')): + include_ppc = False arch_string = "" if include_ppc: arch_string = "-arch ppc " |