summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2012-07-30 11:16:49 +0200
committerStefan Behnel <stefan_ml@behnel.de>2012-07-30 11:16:49 +0200
commitc037f61ba81da8abb9b4852d0d0ba292754fcd67 (patch)
treeca97bd0054d92d75cf89d02a8706dc2ed381a68d
parent7e8c247d6b8032996fe7a96b1434c641de6131fa (diff)
downloadpython-lxml-c037f61ba81da8abb9b4852d0d0ba292754fcd67.tar.gz
code cleanup
-rw-r--r--buildlibxml.py22
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 "