Commit f366e1bb authored by Ned Deily's avatar Ned Deily

Issue #11054: Allow Mac OS X installer builds to again work on 10.5 with

the system-provided Python.  Also, properly guard a new Python 3 only
installer build step so that build-installer.py can stay compatible
with the 2.7 version.  (with release manager approval for 3.2rc2)
parent 87a5f0f4
...@@ -14,7 +14,7 @@ for each release: ...@@ -14,7 +14,7 @@ for each release:
1. 32-bit-only, i386 and PPC universal, capable on running on all machines 1. 32-bit-only, i386 and PPC universal, capable on running on all machines
supported by Mac OS X 10.3.9 through (at least) 10.6:: supported by Mac OS X 10.3.9 through (at least) 10.6::
python2.6 build-installer.py \ python build-installer.py \
--sdk-path=/Developer/SDKs/MacOSX10.4u.sdk \ --sdk-path=/Developer/SDKs/MacOSX10.4u.sdk \
--universal-archs=32-bit \ --universal-archs=32-bit \
--dep-target=10.3 --dep-target=10.3
...@@ -38,7 +38,7 @@ for each release: ...@@ -38,7 +38,7 @@ for each release:
* ``MacOSX10.4u`` SDK (later SDKs do not support PPC G3 processors) * ``MacOSX10.4u`` SDK (later SDKs do not support PPC G3 processors)
* ``MACOSX_DEPLOYMENT_TARGET=10.3`` * ``MACOSX_DEPLOYMENT_TARGET=10.3``
* Apple ``gcc-4.0`` * Apple ``gcc-4.0``
* Python 2.6 for documentation build with Sphinx * Python 2.n (n >= 4) for documentation build with Sphinx
- alternate build environments: - alternate build environments:
...@@ -48,7 +48,7 @@ for each release: ...@@ -48,7 +48,7 @@ for each release:
2. 64-bit / 32-bit, x86_64 and i386 universal, for OS X 10.6 (and later):: 2. 64-bit / 32-bit, x86_64 and i386 universal, for OS X 10.6 (and later)::
python2.6 build-installer.py \ python build-installer.py \
--sdk-path=/Developer/SDKs/MacOSX10.6.sdk \ --sdk-path=/Developer/SDKs/MacOSX10.6.sdk \
--universal-archs=intel \ --universal-archs=intel \
--dep-target=10.6 --dep-target=10.6
...@@ -67,7 +67,7 @@ for each release: ...@@ -67,7 +67,7 @@ for each release:
* ``MacOSX10.6`` SDK * ``MacOSX10.6`` SDK
* ``MACOSX_DEPLOYMENT_TARGET=10.6`` * ``MACOSX_DEPLOYMENT_TARGET=10.6``
* Apple ``gcc-4.2`` * Apple ``gcc-4.2``
* Python 2.6 for documentation build with Sphinx * Python 2.n (n >= 4) for documentation build with Sphinx
- alternate build environments: - alternate build environments:
......
#!/usr/bin/python #!/usr/bin/python
""" """
This script is used to build the "official unofficial" universal build on This script is used to build "official" universal installers on Mac OS X.
Mac OS X. It requires Mac OS X 10.4, Xcode 2.2 and the 10.4u SDK to do its It requires at least Mac OS X 10.4, Xcode 2.2 and the 10.4u SDK for
work. 64-bit or four-way universal builds require at least OS X 10.5 and 32-bit builds. 64-bit or four-way universal builds require at least
the 10.5 SDK. OS X 10.5 and the 10.5 SDK.
Please ensure that this script keeps working with Python 2.3, to avoid Please ensure that this script keeps working with Python 2.5, to avoid
bootstrap issues (/usr/bin/python is Python 2.3 on OSX 10.4) bootstrap issues (/usr/bin/python is Python 2.5 on OSX 10.5). Sphinx,
which is used to build the documentation, currently requires at least
Python 2.4.
Usage: see USAGE variable in the script. Usage: see USAGE variable in the script.
""" """
...@@ -405,6 +407,9 @@ def checkEnvironment(): ...@@ -405,6 +407,9 @@ def checkEnvironment():
Check that we're running on a supported system. Check that we're running on a supported system.
""" """
if sys.version_info[0:2] < (2, 4):
fatal("This script must be run with Python 2.4 or later")
if platform.system() != 'Darwin': if platform.system() != 'Darwin':
fatal("This script should be run on a Mac OS X 10.4 (or later) system") fatal("This script should be run on a Mac OS X 10.4 (or later) system")
...@@ -835,29 +840,33 @@ def buildPython(): ...@@ -835,29 +840,33 @@ def buildPython():
os.chmod(p, stat.S_IMODE(st.st_mode) | stat.S_IWGRP) os.chmod(p, stat.S_IMODE(st.st_mode) | stat.S_IWGRP)
os.chown(p, -1, gid) os.chown(p, -1, gid)
if PYTHON_3:
LDVERSION=None LDVERSION=None
VERSION=None VERSION=None
ABIFLAGS=None ABIFLAGS=None
with open(os.path.join(buildDir, 'Makefile')) as fp: fp = open(os.path.join(buildDir, 'Makefile'), 'r')
for ln in fp: for ln in fp:
if ln.startswith('VERSION='): if ln.startswith('VERSION='):
VERSION=ln.split()[1] VERSION=ln.split()[1]
if ln.startswith('ABIFLAGS='): if ln.startswith('ABIFLAGS='):
ABIFLAGS=ln.split()[1] ABIFLAGS=ln.split()[1]
if ln.startswith('LDVERSION='): if ln.startswith('LDVERSION='):
LDVERSION=ln.split()[1] LDVERSION=ln.split()[1]
fp.close()
LDVERSION = LDVERSION.replace('$(VERSION)', VERSION) LDVERSION = LDVERSION.replace('$(VERSION)', VERSION)
LDVERSION = LDVERSION.replace('$(ABIFLAGS)', ABIFLAGS) LDVERSION = LDVERSION.replace('$(ABIFLAGS)', ABIFLAGS)
config_suffix = '-' + LDVERSION
else:
config_suffix = '' # Python 2.x
# We added some directories to the search path during the configure # We added some directories to the search path during the configure
# phase. Remove those because those directories won't be there on # phase. Remove those because those directories won't be there on
# the end-users system. # the end-users system.
path =os.path.join(rootDir, 'Library', 'Frameworks', 'Python.framework', path =os.path.join(rootDir, 'Library', 'Frameworks', 'Python.framework',
'Versions', version, 'lib', 'python%s'%(version,), 'Versions', version, 'lib', 'python%s'%(version,),
'config-' + LDVERSION, 'Makefile') 'config' + config_suffix, 'Makefile')
fp = open(path, 'r') fp = open(path, 'r')
data = fp.read() data = fp.read()
fp.close() fp.close()
......
...@@ -73,6 +73,13 @@ Library ...@@ -73,6 +73,13 @@ Library
- Issue #9509: argparse now properly handles IOErrors raised by - Issue #9509: argparse now properly handles IOErrors raised by
argparse.FileType. argparse.FileType.
Build
-----
- Issue #11054: Allow Mac OS X installer builds to again work on 10.5 with
the system-provided Python.
What's New in Python 3.2 Release Candidate 1 What's New in Python 3.2 Release Candidate 1
============================================ ============================================
......
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