@@ -8,70 +8,83 @@ $DESTROOT, massages that installation to remove .pyc files and such, creates
88an Installer package from the installation plus other files in ``resources``
99and ``scripts`` and placed that on a ``.dmg`` disk image.
1010
11- As of Python 2.7.x and 3.2, PSF practice is to build two installer variants
12- for each release:
11+ For Python 2.7.x and 3.2.x , PSF practice is to build two installer variants
12+ for each release.
1313
14141. 32-bit-only, i386 and PPC universal, capable on running on all machines
15- supported by Mac OS X 10.3.9 through (at least) 10.6 ::
15+ supported by Mac OS X 10.3.9 through (at least) 10.8 ::
1616
17- python build-installer.py \
17+ /usr/bin/ python build-installer.py \
1818 --sdk-path=/Developer/SDKs/MacOSX10.4u.sdk \
1919 --universal-archs=32-bit \
2020 --dep-target=10.3
21- # These are the current default options
2221
2322 - builds the following third-party libraries
2423
2524 * Bzip2
26- * Zlib 1.2.3
27- * GNU Readline (GPL)
28- * SQLite 3
2925 * NCurses
26+ * GNU Readline (GPL)
27+ * SQLite 3.7.13
28+ * Zlib 1.2.3
3029 * Oracle Sleepycat DB 4.8 (Python 2.x only)
3130
3231 - requires ActiveState ``Tcl/Tk 8.4`` (currently 8.4.19) to be installed for building
3332
34- - current target build environment:
33+ - recommended build environment:
3534
3635 * Mac OS X 10.5.8 PPC or Intel
37- * Xcode 3.1.4 (or later)
36+ * Xcode 3.1.4
3837 * ``MacOSX10.4u`` SDK (later SDKs do not support PPC G3 processors)
3938 * ``MACOSX_DEPLOYMENT_TARGET=10.3``
4039 * Apple ``gcc-4.0``
41- * Python 2.n (n >= 4) for documentation build with Sphinx
40+ * system Python 2.5 for documentation build with Sphinx
4241
4342 - alternate build environments:
4443
45- * Mac OS X 10.4.11 with Xcode 2.5
46- * Mac OS X 10.6.6 with Xcode 3.2.5
44+ * Mac OS X 10.6.8 with Xcode 3.2.6
4745 - need to change ``/System/Library/Frameworks/{Tcl,Tk}.framework/Version/Current`` to ``8.4``
46+ * Note Xcode 4.* does not support building for PPC so cannot be used for this build
47+
4848
49492. 64-bit / 32-bit, x86_64 and i386 universal, for OS X 10.6 (and later)::
5050
51- python build-installer.py \
51+ /usr/bin/ python build-installer.py \
5252 --sdk-path=/Developer/SDKs/MacOSX10.6.sdk \
5353 --universal-archs=intel \
5454 --dep-target=10.6
5555
56+ - builds the following third-party libraries
57+
58+ * NCurses 5.9 (http://bugs.python.org/issue15037)
59+ * SQLite 3.7.13
60+
5661 - uses system-supplied versions of third-party libraries
57-
62+
5863 * readline module links with Apple BSD editline (libedit)
59- * builds Oracle Sleepycat DB 4.8 (Python 2.x only)
6064
6165 - requires ActiveState Tcl/Tk 8.5.9 (or later) to be installed for building
6266
63- - current target build environment:
64-
65- * Mac OS X 10.6.6 (or later)
66- * Xcode 3.2.5 (or later)
67+ - recommended build environment:
68+
69+ * Mac OS X 10.6.8 (or later)
70+ * Xcode 3.2.6
6771 * ``MacOSX10.6`` SDK
6872 * ``MACOSX_DEPLOYMENT_TARGET=10.6``
6973 * Apple ``gcc-4.2``
70- * Python 2.n (n >= 4) for documentation build with Sphinx
74+ * system Python 2.6 for documentation build with Sphinx
7175
7276 - alternate build environments:
7377
74- * none
78+ * none. Xcode 4.x currently supplies two C compilers.
79+ ``llvm-gcc-4.2.1`` has been found to miscompile Python 3.3.x and
80+ produce a non-functional Python executable. As it appears to be
81+ considered a migration aid by Apple and is not likely to be fixed,
82+ its use should be avoided. The other compiler, ``clang``, has been
83+ undergoing rapid development. While it appears to have become
84+ production-ready in the most recent Xcode 4 releases (Xcode 4.5.x
85+ as of this writing), there are still some open issues when
86+ building Python and there has not yet been the level of exposure in
87+ production environments that the Xcode 3 gcc-4.2 compiler has had.
7588
7689
7790General Prerequisites
@@ -87,6 +100,11 @@ General Prerequisites
87100* It is safest to start each variant build with an empty source directory
88101 populated with a fresh copy of the untarred source.
89102
103+ * It is recommended that you remove any existing installed version of the
104+ Python being built::
105+
106+ sudo rm -rf /Library/Frameworks/Python.framework/Versions/n.n
107+
90108
91109The Recipe
92110----------
@@ -107,9 +125,9 @@ Building other universal installers
107125...................................
108126
109127It is also possible to build a 4-way universal installer that runs on
110- OS X Leopard or later::
128+ OS X 10.5 Leopard or later::
111129
112- python 2.6 /build-installer.py \
130+ /usr/bin/python /build-installer.py \
113131 --dep-target=10.5
114132 --universal-archs=all
115133 --sdk-path=/Developer/SDKs/MacOSX10.5.sdk
@@ -120,7 +138,8 @@ also that you are building on at least OS X 10.5. 4-way includes
120138variants can only be run on G5 machines running 10.5. Note that,
121139while OS X 10.6 is only supported on Intel-based machines, it is possible
122140to run ``ppc`` (32-bit) executables unmodified thanks to the Rosetta ppc
123- emulation in OS X 10.5 and 10.6.
141+ emulation in OS X 10.5 and 10.6. The 4-way installer variant must be
142+ built with Xcode 3. It is not regularly built or tested.
124143
125144Other ``--universal-archs`` options are ``64-bit`` (``x86_64``, ``ppc64``),
126145and ``3-way`` (``ppc``, ``i386``, ``x86_64``). None of these options
@@ -133,15 +152,21 @@ Testing
133152Ideally, the resulting binaries should be installed and the test suite run
134153on all supported OS X releases and architectures. As a practical matter,
135154that is generally not possible. At a minimum, variant 1 should be run on
136- at least one Intel, one PPC G4, and one PPC G3 system and one each of
137- OS X 10.6 , 10.5 , 10.4, and 10.3.9. Not all tests run on 10.3.9.
138- Variant 2 should be run on 10.6 in both 32-bit and 64-bit modes.::
155+ a PPC G4 system with OS X 10.5 and at least one Intel system running OS X
156+ 10.8 , 10.7 , 10.6, or 10.5. Variant 2 should be run on 10.8, 10.7, and 10.6
157+ systems in both 32-bit and 64-bit modes.::
139158
140- arch -i386 /usr/local/bin/pythonn.n -m test.regrtest -w -u all
141- arch -X86_64 /usr/local/bin/pythonn.n -m test.regrtest -w -u all
159+ /usr/local/bin/pythonn.n -m test -w -u all,-largefile
160+ /usr/local/bin/pythonn.n-32 -m test -w -u all
142161
143162Certain tests will be skipped and some cause the interpreter to fail
144163which will likely generate ``Python quit unexpectedly`` alert messages
145- to be generated at several points during a test run. These can
146- be ignored.
164+ to be generated at several points during a test run. These are normal
165+ during testing and can be ignored.
166+
167+ It is also recommend to launch IDLE and verify that it is at least
168+ functional. Double-click on the IDLE app icon in ``/Applications/Pythonn.n``.
169+ It should also be tested from the command line::
170+
171+ /usr/local/bin/idlen.n
147172
0 commit comments