|
8 | 8 | Please ensure that this script keeps working with Python 2.5, to avoid |
9 | 9 | bootstrap issues (/usr/bin/python is Python 2.5 on OSX 10.5). Sphinx, |
10 | 10 | which is used to build the documentation, currently requires at least |
11 | | -Python 2.4. |
| 11 | +Python 2.4. However, as of Python 3.4.1, Doc builds require an external |
| 12 | +sphinx-build and the current versions of Sphinx now require at least |
| 13 | +Python 2.6. |
12 | 14 |
|
13 | 15 | In addition to what is supplied with OS X 10.5+ and Xcode 3+, the script |
14 | 16 | requires an installed version of hg and a third-party version of |
|
21 | 23 |
|
22 | 24 | 32-bit-only installer builds are still possible on OS X 10.4 with Xcode 2.5 |
23 | 25 | and the installation of additional components, such as a newer Python |
24 | | -(2.5 is needed for Python parser updates), hg, and svn (for the documentation |
25 | | -build). |
| 26 | +(2.5 is needed for Python parser updates), hg, and for the documentation |
| 27 | +build either svn (pre-3.4.1) or sphinx-build (3.4.1 and later). |
26 | 28 |
|
27 | 29 | Usage: see USAGE variable in the script. |
28 | 30 | """ |
@@ -365,7 +367,8 @@ def library_recipes(): |
365 | 367 | # Instructions for building packages inside the .mpkg. |
366 | 368 | def pkg_recipes(): |
367 | 369 | unselected_for_python3 = ('selected', 'unselected')[PYTHON_3] |
368 | | - unselected_for_lt_python34 = ('selected', 'unselected')[getVersionTuple() < (3, 4)] |
| 370 | + # unselected if 3.0 through 3.3, selected otherwise (2.x or >= 3.4) |
| 371 | + unselected_for_lt_python34 = ('selected', 'unselected')[(3, 0) <= getVersionTuple() < (3, 4)] |
369 | 372 | result = [ |
370 | 373 | dict( |
371 | 374 | name="PythonFramework", |
@@ -610,8 +613,8 @@ def checkEnvironment(): |
610 | 613 | # Ensure ws have access to hg and to sphinx-build. |
611 | 614 | # You may have to create links in /usr/bin for them. |
612 | 615 | runCommand('hg --version') |
613 | | - runCommand('sphinx-build --version') |
614 | | - |
| 616 | + if getVersionTuple() >= (3, 4): |
| 617 | + runCommand('sphinx-build --version') |
615 | 618 |
|
616 | 619 | def parseOptions(args=None): |
617 | 620 | """ |
@@ -924,9 +927,15 @@ def buildPythonDocs(): |
924 | 927 | docdir = os.path.join(rootDir, 'pydocs') |
925 | 928 | curDir = os.getcwd() |
926 | 929 | os.chdir(buildDir) |
927 | | - runCommand('make clean') |
928 | | - # Assume sphinx-build is on our PATH, checked in checkEnvironment |
929 | | - runCommand('make html') |
| 930 | + # The Doc build changed for 3.4 (technically, for 3.4.1) |
| 931 | + if getVersionTuple() < (3, 4): |
| 932 | + # This step does an svn checkout of sphinx and its dependencies |
| 933 | + runCommand('make update') |
| 934 | + runCommand("make html PYTHON='%s'" % os.path.abspath(sys.executable)) |
| 935 | + else: |
| 936 | + runCommand('make clean') |
| 937 | + # Assume sphinx-build is on our PATH, checked in checkEnvironment |
| 938 | + runCommand('make html') |
930 | 939 | os.chdir(curDir) |
931 | 940 | if not os.path.exists(docdir): |
932 | 941 | os.mkdir(docdir) |
|
0 commit comments