Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add build process notes to README.rst #2016

Merged
merged 5 commits into from
Jun 30, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,51 @@ rendering pipeline:
local clone of the PEP repository
* Run ``./manage.py generate_pep_pages`` as described in
https://pythondotorg.readthedocs.io/pep_generation.html


Rendering PEPs with Sphinx
==========================

Build PEPs with Sphinx locally:
-------------------------------

1. Ensure you have Python 3.9 and Sphinx installed
AA-Turner marked this conversation as resolved.
Show resolved Hide resolved
2. If you have access to ``make``, follow (i), otherwise (ii)

i. Run ``make sphinx-local``
ii. Run ``python build.py -j 8 --build-files``. Note that the jobs argument
only takes effect on unix (non-mac) systems.
3. Wait for Sphinx to render the PEPs. There may be a series of warnings about
unreferenced citations or labels -- whilst these are valid warnings they do
not impact the build process.
4. Navigate to the ``build`` directory of your PEPs repo to find the HTML pages.
AA-Turner marked this conversation as resolved.
Show resolved Hide resolved

Arguments to the build file:
AA-Turner marked this conversation as resolved.
Show resolved Hide resolved
----------------------------

Renderers:

``-f`` or ``--build-files``
Renders PEPs to ``pep-XXXX.html`` files

``-d`` or ``--build-dirs``
Renders PEPs to ``index.html`` files within ``pep-XXXX`` directories

Options:

``-i`` or ``--index-file``
Copies PEP 0 to a base index file

``-j`` or ``--jobs``
How many parallel jobs to run (if supported). Integer, default 1

``-n`` or ``--nitpicky``
Runs Sphinx in `nitpicky` mode

``-w`` or ``--fail-on-warning``
Fails Sphinx on warnings

Tools:

``-l`` or ``--check-links``
Checks validity of links within PEP sources