Doc: do not rely on checked-out Sphinx toolchain from svn.python.org … · pythoncapi/cpython@f7b2f36 · GitHub
Skip to content

Commit f7b2f36

Browse files
committed
Doc: do not rely on checked-out Sphinx toolchain from svn.python.org anymore
Nowadays it is likely that people will have Sphinx installed, and if not, they will know how to install it. This also simplifies life a lot for distribution packagers, who typically do not want the doc build process to connect to external web resources.
1 parent a3d0ffe commit f7b2f36

5 files changed

Lines changed: 15 additions & 64 deletions

File tree

.hgignore

Lines changed: 0 additions & 5 deletions

Doc/Makefile

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
# You can set these variables from the command line.
77
PYTHON = python
8-
SVNROOT = http://svn.python.org/projects
8+
SPHINXBUILD = sphinx-build
99
SPHINXOPTS =
1010
PAPER =
1111
SOURCES =
@@ -21,7 +21,6 @@ ALLSPHINXOPTS = -b $(BUILDER) -d build/doctrees -D latex_paper_size=$(PAPER) \
2121
help:
2222
@echo "Please use \`make <target>' where <target> is one of"
2323
@echo " clean to remove build files"
24-
@echo " update to update build tools"
2524
@echo " html to make standalone HTML files"
2625
@echo " htmlhelp to make HTML files and a HTML help project"
2726
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@@ -37,30 +36,8 @@ help:
3736
@echo " check to run a check for frequent markup errors"
3837
@echo " serve to serve the documentation on the localhost (8000)"
3938

40-
# Note: if you update versions here, do the same in make.bat and README.txt
41-
checkout:
42-
@if [ ! -d tools/sphinx ]; then \
43-
echo "Checking out Sphinx..."; \
44-
svn checkout $(SVNROOT)/external/Sphinx-1.2/sphinx tools/sphinx; \
45-
fi
46-
@if [ ! -d tools/docutils ]; then \
47-
echo "Checking out Docutils..."; \
48-
svn checkout $(SVNROOT)/external/docutils-0.11/docutils tools/docutils; \
49-
fi
50-
@if [ ! -d tools/jinja2 ]; then \
51-
echo "Checking out Jinja..."; \
52-
svn checkout $(SVNROOT)/external/Jinja-2.3.1/jinja2 tools/jinja2; \
53-
fi
54-
@if [ ! -d tools/pygments ]; then \
55-
echo "Checking out Pygments..."; \
56-
svn checkout $(SVNROOT)/external/Pygments-1.6/pygments tools/pygments; \
57-
fi
58-
59-
update: clean checkout
60-
6139
build: checkout
62-
mkdir -p build/$(BUILDER) build/doctrees
63-
$(PYTHON) tools/sphinx-build.py $(ALLSPHINXOPTS)
40+
$(SPHINXBUILD) $(ALLSPHINXOPTS)
6441
@echo
6542

6643
html: BUILDER = html
@@ -120,10 +97,6 @@ htmlview: html
12097

12198
clean:
12299
-rm -rf build/*
123-
-rm -rf tools/sphinx
124-
-rm -rf tools/pygments
125-
-rm -rf tools/jinja2
126-
-rm -rf tools/docutils
127100

128101
dist:
129102
rm -rf dist

Doc/conf.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@
6161
# By default, highlight as Python 3.
6262
highlight_language = 'python3'
6363

64+
needs_sphinx = '1.1'
65+
6466

6567
# Options for HTML output
6668
# -----------------------

Doc/make.bat

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
@@echo off
22
setlocal
33

4-
set SVNROOT=http://svn.python.org/projects
54
if "%PYTHON%" EQU "" set PYTHON=py -2
65
if "%HTMLHELP%" EQU "" set HTMLHELP=%ProgramFiles%\HTML Help Workshop\hhc.exe
76
if "%DISTVERSION%" EQU "" for /f "usebackq" %%v in (`%PYTHON% tools/sphinxext/patchlevel.py`) do set DISTVERSION=%%v
@@ -14,15 +13,11 @@ if "%1" EQU "text" goto build
1413
if "%1" EQU "suspicious" goto build
1514
if "%1" EQU "linkcheck" goto build
1615
if "%1" EQU "changes" goto build
17-
if "%1" EQU "checkout" goto checkout
18-
if "%1" EQU "update" goto update
1916

2017
:help
2118
set this=%~n0
2219
echo HELP
2320
echo.
24-
echo %this% checkout
25-
echo %this% update
2621
echo %this% html
2722
echo %this% htmlhelp
2823
echo %this% latex
@@ -33,20 +28,6 @@ echo %this% changes
3328
echo.
3429
goto end
3530

36-
:checkout
37-
svn co %SVNROOT%/external/Sphinx-1.2/sphinx tools/sphinx
38-
svn co %SVNROOT%/external/docutils-0.11/docutils tools/docutils
39-
svn co %SVNROOT%/external/Jinja-2.3.1/jinja2 tools/jinja2
40-
svn co %SVNROOT%/external/Pygments-1.6/pygments tools/pygments
41-
goto end
42-
43-
:update
44-
svn update tools/sphinx
45-
svn update tools/docutils
46-
svn update tools/jinja2
47-
svn update tools/pygments
48-
goto end
49-
5031
:build
5132
if not exist build mkdir build
5233
if not exist build\%1 mkdir build\%1

Doc/tools/sphinxext/pyspecific.py

Lines changed: 11 additions & 11 deletions

0 commit comments

Comments
 (0)