Skip to content

Commit 7e60f51

Browse files
committed
Issue #20644: OS X installer build support for documentation build changes
in 3.4.1: assume externally supplied sphinx-build is available in /usr/bin.
1 parent af8a4df commit 7e60f51

3 files changed

Lines changed: 40 additions & 21 deletions

File tree

Mac/BuildScript/README.txt

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,24 @@ For Python 3.4.0, PSF practice is to build two installer variants
1212
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.5 through (at least) 10.8::
15+
supported by Mac OS X 10.5 through (at least) 10.9::
1616

17-
/usr/bin/python build-installer.py \
17+
/path/to/bootstrap/python2.7 build-installer.py \
1818
--sdk-path=/Developer/SDKs/MacOSX10.5.sdk \
1919
--universal-archs=32-bit \
2020
--dep-target=10.5
2121

2222
- builds the following third-party libraries
2323

2424
* NCurses 5.9 (http://bugs.python.org/issue15037)
25-
* SQLite 3.8.1
25+
* SQLite 3.8.3.1
2626
* XZ 5.0.5
2727

2828
- uses system-supplied versions of third-party libraries
2929

3030
* readline module links with Apple BSD editline (libedit)
3131

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

3434
- recommended build environment:
3535

@@ -38,7 +38,8 @@ for each release.
3838
* ``MacOSX10.5`` SDK
3939
* ``MACOSX_DEPLOYMENT_TARGET=10.5``
4040
* Apple ``gcc-4.2``
41-
* system Python 2.5 for documentation build with Sphinx
41+
* bootstrap non-framework Python 2.7 for documentation build with
42+
Sphinx (as of 3.4.1)
4243

4344
- alternate build environments:
4445

@@ -48,22 +49,22 @@ for each release.
4849

4950
2. 64-bit / 32-bit, x86_64 and i386 universal, for OS X 10.6 (and later)::
5051

51-
/usr/bin/python build-installer.py \
52+
/path/to/bootstrap/python2.7 build-installer.py \
5253
--sdk-path=/Developer/SDKs/MacOSX10.6.sdk \
5354
--universal-archs=intel \
5455
--dep-target=10.6
5556

5657
- builds the following third-party libraries
5758

5859
* NCurses 5.9 (http://bugs.python.org/issue15037)
59-
* SQLite 3.8.1
60+
* SQLite 3.8.3.1
6061
* XZ 5.0.5
6162

6263
- uses system-supplied versions of third-party libraries
6364

6465
* readline module links with Apple BSD editline (libedit)
6566

66-
- requires ActiveState Tcl/Tk 8.5.15 (or later) to be installed for building
67+
- requires ActiveState Tcl/Tk 8.5.15.1 (or later) to be installed for building
6768

6869
- recommended build environment:
6970

@@ -72,7 +73,8 @@ for each release.
7273
* ``MacOSX10.6`` SDK
7374
* ``MACOSX_DEPLOYMENT_TARGET=10.6``
7475
* Apple ``gcc-4.2``
75-
* system Python 2.6 for documentation build with Sphinx
76+
* bootstrap non-framework Python 2.7 for documentation build with
77+
Sphinx (as of 3.4.1)
7678

7779
- alternate build environments:
7880

@@ -82,10 +84,10 @@ for each release.
8284
considered a migration aid by Apple and is not likely to be fixed,
8385
its use should be avoided. The other compiler, ``clang``, has been
8486
undergoing rapid development. While it appears to have become
85-
production-ready in the most recent Xcode 4 releases (Xcode 4.6.3
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.
87+
production-ready in the most recent Xcode 5 releases, the versions
88+
available on the deprecated Xcode 4.x for 10.6 were early releases
89+
and did not receive the level of exposure in production environments
90+
that the Xcode 3 gcc-4.2 compiler has had.
8991

9092

9193
* For Python 2.7.x and 3.2.x, the 32-bit-only installer was configured to
@@ -111,7 +113,7 @@ for each release.
111113
* Zlib 1.2.3
112114
* Oracle Sleepycat DB 4.8 (Python 2.x only)
113115

114-
- requires ActiveState ``Tcl/Tk 8.4`` (currently 8.4.19) to be installed for building
116+
- requires ActiveState ``Tcl/Tk 8.4`` (currently 8.4.20) to be installed for building
115117

116118
- recommended build environment:
117119

@@ -137,7 +139,13 @@ General Prerequisites
137139
interfere with the build.
138140

139141
* The documentation for the release is built using Sphinx
140-
because it is included in the installer.
142+
because it is included in the installer. For 2.7.x and 3.x.x up to and
143+
including 3.4.0, the ``Doc/Makefile`` uses ``svn`` to download repos of
144+
``Sphinx`` and its dependencies. Beginning with 3.4.1, the ``Doc/Makefile``
145+
assumes there is an externally-provided ``sphinx-build`` and requires at
146+
least Python 2.6 to run. Because of this, it is no longer possible to
147+
build a 3.4.1 or later installer on OS X 10.5 using the Apple-supplied
148+
Python 2.5.
141149

142150
* It is safest to start each variant build with an empty source directory
143151
populated with a fresh copy of the untarred source.
@@ -195,8 +203,8 @@ Ideally, the resulting binaries should be installed and the test suite run
195203
on all supported OS X releases and architectures. As a practical matter,
196204
that is generally not possible. At a minimum, variant 1 should be run on
197205
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.::
206+
10.9, 10.8, 10.7, 10.6, or 10.5. Variant 2 should be run on 10.9, 10.8,
207+
10.7, and 10.6 systems in both 32-bit and 64-bit modes.::
200208

201209
/usr/local/bin/pythonn.n -m test -w -u all,-largefile
202210
/usr/local/bin/pythonn.n-32 -m test -w -u all
@@ -207,7 +215,7 @@ to be generated at several points during a test run. These are normal
207215
during testing and can be ignored.
208216

209217
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``.
218+
functional. Double-click on the IDLE app icon in ``/Applications/Python n.n``.
211219
It should also be tested from the command line::
212220

213221
/usr/local/bin/idlen.n

Mac/BuildScript/build-installer.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ def library_recipes():
194194
LT_10_5 = bool(DEPTARGET < '10.5')
195195

196196
# Disable for now
197-
if (DEPTARGET > '10.5') and (getVersionTuple() >= (3, 5)):
197+
if False: # if (DEPTARGET > '10.5') and (getVersionTuple() >= (3, 5)):
198198
result.extend([
199199
dict(
200200
name="Tcl 8.5.15",
@@ -607,6 +607,10 @@ def checkEnvironment():
607607
base_path = base_path + ':' + OLD_DEVELOPER_TOOLS
608608
os.environ['PATH'] = base_path
609609
print("Setting default PATH: %s"%(os.environ['PATH']))
610+
# Ensure ws have access to hg and to sphinx-build.
611+
# You may have to create links in /usr/bin for them.
612+
runCommand('hg --version')
613+
runCommand('sphinx-build --version')
610614

611615

612616
def parseOptions(args=None):
@@ -920,8 +924,9 @@ def buildPythonDocs():
920924
docdir = os.path.join(rootDir, 'pydocs')
921925
curDir = os.getcwd()
922926
os.chdir(buildDir)
923-
runCommand('make update')
924-
runCommand("make html PYTHON='%s'" % os.path.abspath(sys.executable))
927+
runCommand('make clean')
928+
# Assume sphinx-build is on our PATH, checked in checkEnvironment
929+
runCommand('make html')
925930
os.chdir(curDir)
926931
if not os.path.exists(docdir):
927932
os.mkdir(docdir)

Misc/NEWS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,12 @@ IDLE
117117
- Issue #17654: Ensure IDLE menus are customized properly on OS X for
118118
non-framework builds and for all variants of Tk.
119119

120+
Build
121+
-----
122+
123+
- Issue #20644: OS X installer build support for documentation build changes
124+
in 3.4.1: assume externally supplied sphinx-build is available in /usr/bin.
125+
120126
C API
121127
-----
122128
- Issue #20942: PyImport_ImportFrozenModuleObject() no longer sets __file__ to

0 commit comments

Comments
 (0)