Kaydet (Commit) 87adb6ef authored tarafından Ned Deily's avatar Ned Deily

Issue #14499: Fix several problems with OS X universal build support:

    1. ppc arch detection for extension module builds broke with Xcode 5
    2. ppc arch detection in configure did not work on OS X 10.4
    3. -sysroot and -arch flags were unnecessarily duplicated
    4. there was no obvious way to configure an intel-32 only build.
üst ea41d5f2
......@@ -235,13 +235,19 @@ def _remove_unsupported_archs(_config_vars):
if re.search('-arch\s+ppc', _config_vars['CFLAGS']) is not None:
# NOTE: Cannot use subprocess here because of bootstrap
# issues when building Python itself
status = os.system("'%s' -arch ppc -x c /dev/null 2>/dev/null"%(
_config_vars['CC'].replace("'", "'\"'\"'"),))
# The Apple compiler drivers return status 255 if no PPC
if (status >> 8) == 255:
# Compiler doesn't support PPC, remove the related
# '-arch' flags if not explicitly overridden by an
# environment variable
status = os.system(
"""echo 'int main{};' | """
"""'%s' -c -arch ppc -x c -o /dev/null /dev/null 2>/dev/null"""
%(_config_vars['CC'].replace("'", "'\"'\"'"),))
if status:
# The compile failed for some reason. Because of differences
# across Xcode and compiler versions, there is no reliable way
# to be sure why it failed. Assume here it was due to lack of
# PPC support and remove the related '-arch' flags from each
# config variables not explicitly overriden by an environment
# variable. If the error was for some other reason, we hope the
# failure will show up again when trying to compile an extension
# module.
for cv in _UNIVERSAL_CONFIG_VARS:
if cv in _config_vars and cv not in os.environ:
flags = _config_vars[cv]
......
......@@ -7,7 +7,7 @@ Python on Mac OS X README
Ronald Oussoren (2010-04),
Ned Deily (2012-06)
:Version: 3.3.0
:Version: 3.4.0
This document provides a quick overview of some Mac OS X specific features in
the Python distribution.
......@@ -99,6 +99,8 @@ values are available:
* ``intel``: ``i386``, ``x86_64``
* ``intel-32``: ``i386``
* ``32-bit``: ``ppc``, ``i386``
* ``3-way``: ``i386``, ``x86_64``, ``ppc``
......@@ -125,7 +127,7 @@ following combinations of SDKs and universal-archs flavors are available:
* 10.7 and 10.8 SDKs with Xcode 4 support ``intel`` only
The makefile for a framework build will also install ``python3.3-32``
The makefile for a framework build will also install ``python3.4-32``
binaries when the universal architecture includes at least one 32-bit
architecture (that is, for all flavors but ``64-bit``).
......@@ -149,7 +151,7 @@ Using ``arch`` is not a perfect solution as the selected architecture will
not automatically carry through to subprocesses launched by programs and tests
under that Python. If you want to ensure that Python interpreters launched in
subprocesses also run in 32-bit-mode if the main interpreter does, use
a ``python3.3-32`` binary and use the value of ``sys.executable`` as the
a ``python3.4-32`` binary and use the value of ``sys.executable`` as the
``subprocess`` ``Popen`` executable value.
......@@ -169,7 +171,7 @@ will have to do the work yourself if you really want this.
A second reason for using frameworks is that they put Python-related items in
only two places: "/Library/Framework/Python.framework" and
"/Applications/Python <VERSION>" where ``<VERSION>`` can be e.g. "3.3",
"/Applications/Python <VERSION>" where ``<VERSION>`` can be e.g. "3.4",
"2.7", etc. This simplifies matters for users installing
Python from a binary distribution if they want to get rid of it again. Moreover,
due to the way frameworks work, a user without admin privileges can install a
......
......@@ -190,6 +190,12 @@ Build
- Issue #15663: Update OS X 10.6+ installer to use Tcl/Tk 8.5.15.
- Issue #14499: Fix several problems with OS X universal build support:
1. ppc arch detection for extension module builds broke with Xcode 5
2. ppc arch detection in configure did not work on OS X 10.4
3. -sysroot and -arch flags were unnecessarily duplicated
4. there was no obvious way to configure an intel-32 only build.
What's New in Python 3.4.0 Alpha 3?
===================================
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment