Skip to content

Commit 5c0b1ca

Browse files
committed
Update various OS X README files for 3.3.0.
1 parent 12c6bda commit 5c0b1ca

4 files changed

Lines changed: 163 additions & 59 deletions

File tree

‎Mac/BuildScript/README.txt‎

Lines changed: 109 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -8,70 +8,125 @@ $DESTROOT, massages that installation to remove .pyc files and such, creates
88
an Installer package from the installation plus other files in ``resources``
99
and ``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+
As of Python 3.3.0, PSF practice is to build two installer variants
12+
for each release.
1313

1414
1. 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.5 through (at least) 10.8::
1616

17-
python build-installer.py \
18-
--sdk-path=/Developer/SDKs/MacOSX10.4u.sdk \
17+
/usr/bin/python build-installer.py \
18+
--sdk-path=/Developer/SDKs/MacOSX10.5.sdk \
1919
--universal-archs=32-bit \
20-
--dep-target=10.3
21-
# These are the current default options
20+
--dep-target=10.5
2221

2322
- builds the following third-party libraries
2423

25-
* Bzip2
26-
* Zlib 1.2.3
27-
* GNU Readline (GPL)
28-
* SQLite 3
29-
* NCurses
30-
* Oracle Sleepycat DB 4.8 (Python 2.x only)
24+
* NCurses 5.9 (http://bugs.python.org/issue15037)
25+
* SQLite 3.7.13
26+
* XZ 5.0.3
27+
28+
- uses system-supplied versions of third-party libraries
29+
30+
* readline module links with Apple BSD editline (libedit)
3131

3232
- requires ActiveState ``Tcl/Tk 8.4`` (currently 8.4.19) to be installed for building
3333

34-
- current target build environment:
35-
36-
* Mac OS X 10.5.8 PPC or Intel
37-
* Xcode 3.1.4 (or later)
38-
* ``MacOSX10.4u`` SDK (later SDKs do not support PPC G3 processors)
39-
* ``MACOSX_DEPLOYMENT_TARGET=10.3``
40-
* Apple ``gcc-4.0``
41-
* Python 2.n (n >= 4) for documentation build with Sphinx
34+
- recommended build environment:
35+
36+
* Mac OS X 10.5.8 Intel or PPC
37+
* Xcode 3.1.4
38+
* ``MacOSX10.5`` SDK
39+
* ``MACOSX_DEPLOYMENT_TARGET=10.5``
40+
* Apple ``gcc-4.2``
41+
* system Python 2.5 for documentation build with Sphinx
4242

4343
- alternate build environments:
4444

45-
* Mac OS X 10.4.11 with Xcode 2.5
46-
* Mac OS X 10.6.6 with Xcode 3.2.5
45+
* Mac OS X 10.6.8 with Xcode 3.2.6
4746
- need to change ``/System/Library/Frameworks/{Tcl,Tk}.framework/Version/Current`` to ``8.4``
47+
* Note Xcode 4.* does not support building for PPC so cannot be used for this build
4848

4949
2. 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+
* XZ 5.0.3
61+
5662
- uses system-supplied versions of third-party libraries
57-
63+
5864
* readline module links with Apple BSD editline (libedit)
59-
* builds Oracle Sleepycat DB 4.8 (Python 2.x only)
6065

6166
- requires ActiveState Tcl/Tk 8.5.9 (or later) to be installed for building
6267

63-
- current target build environment:
64-
65-
* Mac OS X 10.6.6 (or later)
66-
* Xcode 3.2.5 (or later)
68+
- recommended build environment:
69+
70+
* Mac OS X 10.6.8 (or later)
71+
* Xcode 3.2.6
6772
* ``MacOSX10.6`` SDK
6873
* ``MACOSX_DEPLOYMENT_TARGET=10.6``
6974
* Apple ``gcc-4.2``
70-
* Python 2.n (n >= 4) for documentation build with Sphinx
75+
* system Python 2.6 for documentation build with Sphinx
7176

7277
- alternate build environments:
7378

74-
* none
79+
* none. Xcode 4.x currently supplies two C compilers.
80+
``llvm-gcc-4.2.1`` has been found to miscompile Python 3.3.x and
81+
produce a non-functional Python executable. As it appears to be
82+
considered a migration aid by Apple and is not likely to be fixed,
83+
its use should be avoided. The other compiler, ``clang``, has been
84+
undergoing rapid development. While it appears to have become
85+
production-ready in the most recent Xcode 4 releases (Xcode 4.4.1
86+
as of this writing), there are still some open issues when
87+
building Python and there has not yet been the level of exposure in
88+
production environments that the Xcode 3 gcc-4.2 compiler has had.
89+
90+
91+
* For Python 2.7.x and 3.2.x, the 32-bit-only installer was configured to
92+
support Mac OS X 10.3.9 through (at least) 10.6. Because it is
93+
believed that there are few systems still running OS X 10.3 or 10.4
94+
and because it has become increasingly difficult to test and
95+
support the differences in these earlier systems, as of Python 3.3.0 the PSF
96+
32-bit installer no longer supports them. For reference in building such
97+
an installer yourself, the details are::
98+
99+
/usr/bin/python build-installer.py \
100+
--sdk-path=/Developer/SDKs/MacOSX10.4u.sdk \
101+
--universal-archs=32-bit \
102+
--dep-target=10.3
103+
104+
- builds the following third-party libraries
105+
106+
* Bzip2
107+
* NCurses
108+
* GNU Readline (GPL)
109+
* SQLite 3
110+
* XZ
111+
* Zlib 1.2.3
112+
* Oracle Sleepycat DB 4.8 (Python 2.x only)
113+
114+
- requires ActiveState ``Tcl/Tk 8.4`` (currently 8.4.19) to be installed for building
115+
116+
- recommended build environment:
117+
118+
* Mac OS X 10.5.8 PPC or Intel
119+
* Xcode 3.1.4 (or later)
120+
* ``MacOSX10.4u`` SDK (later SDKs do not support PPC G3 processors)
121+
* ``MACOSX_DEPLOYMENT_TARGET=10.3``
122+
* Apple ``gcc-4.0``
123+
* system Python 2.5 for documentation build with Sphinx
124+
125+
- alternate build environments:
126+
127+
* Mac OS X 10.6.8 with Xcode 3.2.6
128+
- need to change ``/System/Library/Frameworks/{Tcl,Tk}.framework/Version/Current`` to ``8.4``
129+
75130

76131

77132
General Prerequisites
@@ -87,6 +142,11 @@ General Prerequisites
87142
* It is safest to start each variant build with an empty source directory
88143
populated with a fresh copy of the untarred source.
89144

145+
* It is recommended that you remove any existing installed version of the
146+
Python being built::
147+
148+
sudo rm -rf /Library/Frameworks/Python.framework/Versions/n.n
149+
90150

91151
The Recipe
92152
----------
@@ -107,9 +167,9 @@ Building other universal installers
107167
...................................
108168

109169
It is also possible to build a 4-way universal installer that runs on
110-
OS X Leopard or later::
170+
OS X 10.5 Leopard or later::
111171

112-
python 2.6 /build-installer.py \
172+
/usr/bin/python /build-installer.py \
113173
--dep-target=10.5
114174
--universal-archs=all
115175
--sdk-path=/Developer/SDKs/MacOSX10.5.sdk
@@ -120,7 +180,8 @@ also that you are building on at least OS X 10.5. 4-way includes
120180
variants can only be run on G5 machines running 10.5. Note that,
121181
while OS X 10.6 is only supported on Intel-based machines, it is possible
122182
to run ``ppc`` (32-bit) executables unmodified thanks to the Rosetta ppc
123-
emulation in OS X 10.5 and 10.6.
183+
emulation in OS X 10.5 and 10.6. The 4-way installer variant must be
184+
built with Xcode 3. It is not regularly built or tested.
124185

125186
Other ``--universal-archs`` options are ``64-bit`` (``x86_64``, ``ppc64``),
126187
and ``3-way`` (``ppc``, ``i386``, ``x86_64``). None of these options
@@ -133,15 +194,21 @@ Testing
133194
Ideally, the resulting binaries should be installed and the test suite run
134195
on all supported OS X releases and architectures. As a practical matter,
135196
that 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.::
197+
a PPC G4 system with OS X 10.5 and at least one Intel system running OS X
198+
10.8, 10.7, 10.6, or 10.5. Variant 2 should be run on 10.8, 10.7, and 10.6
199+
systems in both 32-bit and 64-bit modes.::
139200

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
201+
/usr/local/bin/pythonn.n -m test -w -u all,-largefile
202+
/usr/local/bin/pythonn.n-32 -m test -w -u all
142203

143204
Certain tests will be skipped and some cause the interpreter to fail
144205
which will likely generate ``Python quit unexpectedly`` alert messages
145-
to be generated at several points during a test run. These can
146-
be ignored.
206+
to be generated at several points during a test run. These are normal
207+
during testing and can be ignored.
208+
209+
It is also recommend to launch IDLE and verify that it is at least
210+
functional. Double-click on the IDLE app icon in ``/Applications/Pythonn.n``.
211+
It should also be tested from the command line::
212+
213+
/usr/local/bin/idlen.n
147214

‎Mac/BuildScript/resources/ReadMe.txt‎

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,15 @@ $ARCHITECTURES.
55
Installation requires approximately $INSTALL_SIZE MB of disk space,
66
ignore the message that it will take zero bytes.
77

8-
You must install onto your current boot disk, even though the
9-
installer does not enforce this, otherwise things will not work.
8+
If you are attempting to install on an OS X 10.8 system, you may
9+
see a message that Python can't be installed because it is from an
10+
unidentified developer. This is because this Python installer
11+
package is not yet compatible with the Gatekeeper security feature
12+
introduced in OS X 10.8. To allow Python to be installed, you
13+
can override the Gatekeeper policy for this install. In the Finder,
14+
instead of double-clicking, control-click or right click the "Python"
15+
installer package icon. Then select "Open using ... Installer" from
16+
the contextual menu that appears.
1017

1118
Python consists of the Python programming language interpreter, plus
1219
a set of programs to allow easy access to it for Mac users including
@@ -16,10 +23,11 @@ Python programs.
1623

1724
**** IMPORTANT ****
1825

19-
Before using IDLE or other programs using the tkinter graphical user
20-
interface toolkit, visit http://www.python.org/download/mac/tcltk/
21-
for current information about supported and recommended versions
22-
of Tcl/Tk for this version of Python and Mac OS X.
26+
To use IDLE or other programs that use the tkinter graphical user
27+
interface toolkit, you may need to install a third-party version of
28+
the Tcl/Tk frameworks. Visit http://www.python.org/download/mac/tcltk/
29+
for current information about supported and recommended versions of
30+
Tcl/Tk for this version of Python and of Mac OS X.
2331

2432
*******************
2533

@@ -32,5 +40,13 @@ optionally place links to the command-line tools in /usr/local/bin as
3240
well. Double-click on the "Update Shell Profile" command to add the
3341
"bin" directory inside the framework to your shell's search path.
3442

43+
You must install onto your current boot disk, even though the
44+
installer does not enforce this, otherwise things will not work.
45+
46+
You can verify the integrity of the disk image file containing the
47+
installer package and this ReadMe file by comparing its md5 checksum
48+
and size with the values published on the release page linked at
49+
http://www.python.org/download/
50+
3551
More information on Python in general can be found at
3652
http://www.python.org.

‎Mac/BuildScript/resources/Welcome.rtf‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf350
1+
{\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf470
22
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
33
{\colortbl;\red255\green255\blue255;}
44
\paperw11904\paperh16836\margl1440\margr1440\vieww9640\viewh10620\viewkind0
5-
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural
5+
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640
66

77
\f0\fs24 \cf0 This package will install
88
\b Python $FULL_VERSION
@@ -20,9 +20,9 @@ See the ReadMe file and the Python documentation for more information.\
2020
\
2121

2222
\b NOTE:
23-
\b0 This package will by default not update your shell profile and will also not install files in /usr/local. Double-click
23+
\b0 This package will not update your shell profile by default. Double-click
2424
\b Update Shell Profile
25-
\b0 at any time to make $FULL_VERSION the default Python.\
25+
\b0 at any time to make $FULL_VERSION the default Python 3 version. This version can co-exist with other installed versions of Python 3 and Python 2.\
2626
\
2727

2828
\b IMPORTANT:

‎Mac/README‎

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@ The makefile for a framework build will also install ``python3.3-32``
129129
binaries when the universal architecture includes at least one 32-bit
130130
architecture (that is, for all flavors but ``64-bit``).
131131

132-
Running a specific archicture
133-
.............................
132+
Running a specific architecture
133+
...............................
134134

135135
You can run code using a specific architecture using the ``arch`` command::
136136

@@ -145,6 +145,14 @@ Python 2.7 or 3.2, in earlier versions the python (and pythonw) commands are
145145
wrapper tools that execute the real interpreter without ensuring that the
146146
real interpreter runs with the same architecture.
147147

148+
Using ``arch`` is not a perfect solution as the selected architecture will
149+
not automatically carry through to subprocesses launched by programs and tests
150+
under that Python. If you want to ensure that Python interpreters launched in
151+
subprocesses also run in 32-bit-mode if the main interpreter does, use
152+
a ``python3.3-32`` binary and use the value of ``sys.executable`` as the
153+
``subprocess`` ``Popen`` executable value.
154+
155+
148156
Building and using a framework-based Python on Mac OS X.
149157
========================================================
150158

@@ -180,9 +188,16 @@ Versions/Current and you will see the familiar bin and lib directories.
180188
----------------------------
181189

182190
Yes, probably. If you want Tkinter support you need to get the OSX AquaTk
183-
distribution, this is installed by default on Mac OS X 10.4 or later. If
184-
you want wxPython you need to get that. If you want Cocoa you need to get
185-
PyObjC.
191+
distribution, this is installed by default on Mac OS X 10.4 or later. Be
192+
aware, though, that the Cocoa-based AquaTk's supplied starting with OS X
193+
10.6 have proven to be unstable. If possible, you should consider
194+
installing a newer version before building on OS X 10.6 or later, such as
195+
the ActiveTcl 8.5. See http://www.python.org/download/mac/tcltk/. If you
196+
are building with an SDK, ensure that the newer Tcl and Tk frameworks are
197+
seen in the SDK's ``Library/Frameworks`` directory; you may need to
198+
manually create symlinks to their installed location, ``/Library/Frameworks``.
199+
If you want wxPython you need to get that.
200+
If you want Cocoa you need to get PyObjC.
186201

187202
4. How do I build a framework Python?
188203
-------------------------------------
@@ -260,7 +275,13 @@ However, the Python build process itself has several build dependencies not
260275
available out of the box with OS X 10.4 so you may have to install
261276
additional software beyond what is provided with Xcode 2. OS X 10.5
262277
provides a recent enough system Python (in ``/usr/bin``) to build
263-
the Python documentation set.
278+
the Python documentation set. It should be possible to use SDKs and/or older
279+
versions of Xcode to build installers that are compatible with older systems
280+
on a newer system but this may not be completely foolproof so the resulting
281+
executables, shared libraries, and ``.so`` bundles should be carefully
282+
examined and tested on all supported systems for proper dynamic linking
283+
dependencies. It is safest to build the distribution on a system running the
284+
minimum OS X version supported.
264285

265286
All of this is normally done completely isolated in /tmp/_py, so it does not
266287
use your normal build directory nor does it install into /.
@@ -285,7 +306,7 @@ The configure script sometimes emits warnings like the one below::
285306
configure: WARNING: ## -------------------------------------- ##
286307

287308
This almost always means you are trying to build a universal binary for
288-
Python and have libaries in ``/usr/local`` that don't contain the required
309+
Python and have libraries in ``/usr/local`` that don't contain the required
289310
architectures. Temporarily move ``/usr/local`` aside to finish the build.
290311

291312

0 commit comments

Comments
 (0)