Skip to content

Commit 977f1fe

Browse files
AA-Turnerpablogsal
andauthored
Sphinx support: Add build process notes to README.rst (#2016)
Co-authored-by: Pablo Galindo <[email protected]>
1 parent 2991089 commit 977f1fe

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

README.rst

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,60 @@ rendering pipeline:
7070
local clone of the PEP repository
7171
* Run ``./manage.py generate_pep_pages`` as described in
7272
https://pythondotorg.readthedocs.io/pep_generation.html
73+
74+
75+
Rendering PEPs with Sphinx
76+
==========================
77+
78+
There is a Sphinx-rendered version of the PEPs at https://python.github.io/peps/
79+
(updated on every push to ``master``)
80+
81+
**Warning:** This version is not, and should not be taken to be, a canonical
82+
source for PEPs whilst it remains in preview (`please report any rendering bugs
83+
<https://github.com/python/peps/issues/new>`_). The canonical source for PEPs remains
84+
https://www.python.org/dev/peps/
85+
86+
Build PEPs with Sphinx locally:
87+
-------------------------------
88+
89+
1. Ensure you have Python >=3.9 and Sphinx installed
90+
2. If you have access to ``make``, follow (i), otherwise (ii)
91+
92+
i. Run ``make sphinx-local``
93+
ii. Run ``python build.py -j 8 --build-files``. Note that the jobs argument
94+
only takes effect on unix (non-mac) systems.
95+
3. Wait for Sphinx to render the PEPs. There may be a series of warnings about
96+
unreferenced citations or labels -- whilst these are valid warnings they do
97+
not impact the build process.
98+
4. Navigate to the ``build`` directory of your PEPs repo to find the HTML pages.
99+
PEP 0 provides a formatted index, and may be a useful reference.
100+
101+
Arguments to ``build.py``:
102+
--------------------------
103+
104+
Renderers:
105+
106+
``-f`` or ``--build-files``
107+
Renders PEPs to ``pep-XXXX.html`` files
108+
109+
``-d`` or ``--build-dirs``
110+
Renders PEPs to ``index.html`` files within ``pep-XXXX`` directories
111+
112+
Options:
113+
114+
``-i`` or ``--index-file``
115+
Copies PEP 0 to a base index file
116+
117+
``-j`` or ``--jobs``
118+
How many parallel jobs to run (if supported). Integer, default 1
119+
120+
``-n`` or ``--nitpicky``
121+
Runs Sphinx in `nitpicky` mode
122+
123+
``-w`` or ``--fail-on-warning``
124+
Fails Sphinx on warnings
125+
126+
Tools:
127+
128+
``-l`` or ``--check-links``
129+
Checks validity of links within PEP sources

0 commit comments

Comments
 (0)