summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2020-01-29 09:13:30 +0100
committerStefan Behnel <stefan_ml@behnel.de>2020-01-29 09:13:30 +0100
commit02febd0d7f544446aaed86ab094d53557a53f144 (patch)
treedcfd40df4932910980cf6c1864abe3879748d7fc
parent3c99b116c075c4e93de274ada138eb69a715da59 (diff)
downloadpython-lxml-02febd0d7f544446aaed86ab094d53557a53f144.tar.gz
No longer include PPC and 32bit support by default in the MacOS builds.
-rw-r--r--CHANGES.txt3
-rw-r--r--buildlibxml.py35
2 files changed, 10 insertions, 28 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index e903183c..0623f85a 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -20,6 +20,9 @@ Bugs fixed
Other changes
-------------
+* MacOS builds are 64-bit-only by default.
+ Set CFLAGS and LDFLAGS explicitly to override it.
+
* Linux/MacOS Binary wheels now use libxml2 2.9.10 and libxslt 1.1.34.
* LP#1840234: The package version number is now available as ``lxml.__version__``.
diff --git a/buildlibxml.py b/buildlibxml.py
index 2c289dfa..38030724 100644
--- a/buildlibxml.py
+++ b/buildlibxml.py
@@ -344,36 +344,15 @@ def cmmi(configure_cmd, build_dir, multicore=None, **call_setup):
def configure_darwin_env(env_setup):
import platform
- # check target architectures on MacOS-X (ppc, i386, x86_64)
+ # configure target architectures on MacOS-X (x86_64 only, by default)
major_version, minor_version = tuple(map(int, platform.mac_ver()[0].split('.')[:2]))
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, _ = pipe.communicate()
- xcode_version = (out.decode('utf8').splitlines() or [''])[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 "
- if minor_version < 6:
- env_default = {
- 'CFLAGS': arch_string + "-arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -O2",
- 'LDFLAGS': arch_string + "-arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk",
- 'MACOSX_DEPLOYMENT_TARGET': "10.3"
- }
- else:
- env_default = {
- 'CFLAGS': arch_string + "-arch i386 -arch x86_64 -O2",
- 'LDFLAGS': arch_string + "-arch i386 -arch x86_64",
- 'MACOSX_DEPLOYMENT_TARGET': "10.6"
- }
- env = os.environ.copy()
- env_default.update(env)
+ env_default = {
+ 'CFLAGS': "-arch x86_64 -O2",
+ 'LDFLAGS': "-arch x86_64",
+ 'MACOSX_DEPLOYMENT_TARGET': "10.6"
+ }
+ env_default.update(os.environ)
env_setup['env'] = env_default