Skip to content

Commit 6b6e6b5

Browse files
committed
The PEP Rendering System is dead; long live the PEP Rendering System
1 parent 563de32 commit 6b6e6b5

25 files changed

+65
-2189
lines changed

.github/CODEOWNERS

-6
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,6 @@
1010
Makefile @AA-Turner
1111
requirements.txt @AA-Turner
1212

13-
pep0/ @AA-Turner
14-
docutils.conf @AA-Turner
15-
genpepindex.py @AA-Turner
16-
pep2html.py @AA-Turner
17-
pep2rss.py @AA-Turner
18-
1913
pep_sphinx_extensions/ @AA-Turner
2014
AUTHOR_OVERRIDES.csv @AA-Turner
2115
build.py @AA-Turner

.github/workflows/build.yml

-39
This file was deleted.

.github/workflows/deploy-gh-pages.yml renamed to .github/workflows/render.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
name: Sphinx Build
1+
name: Render PEPs
22

33
on: [push, pull_request, workflow_dispatch]
44

55
jobs:
6-
deploy-to-pages:
7-
name: Build & deploy to GitHub Pages
6+
render-peps:
7+
name: Render PEPs
88
runs-on: ubuntu-latest
99

1010
steps:
@@ -24,7 +24,7 @@ jobs:
2424
python -m pip install --upgrade pip
2525
python -m pip install --upgrade -r requirements.txt
2626
27-
- name: 🔧 Build PEPs
27+
- name: 🔧 Render PEPs
2828
run: make pages -j$(nproc)
2929

3030
# remove the .doctrees folder when building for deployment as it takes two thirds of disk space

CONTRIBUTING.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Contributing Guidelines
22
=======================
33

44
To learn more about the purpose of PEPs and how to go about writing one, please
5-
start reading at `PEP 1 <https://www.python.org/dev/peps/pep-0001/>`_.
5+
start reading at `PEP 1 <https://peps.python.org/pep-0001/>`_.
66
Also, make sure to check the `README <./README.rst>`_ for information
77
on how to render the PEPs in this repository.
88
Thanks again for your contributions, and we look forward to reviewing them!
@@ -12,7 +12,7 @@ Before writing a new PEP
1212
------------------------
1313

1414
Prior to submitting a pull request here with your draft PEP, see `PEP 1
15-
<https://www.python.org/dev/peps/pep-0001/#start-with-an-idea-for-python>`_
15+
<https://peps.python.org/pep-0001/#start-with-an-idea-for-python>`_
1616
for some important steps to consider, including proposing and discussing it
1717
first in an appropriate venue, drafting a PEP and gathering feedback, and
1818
developing at least a prototype reference implementation of your idea.

Makefile

+12-60
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,33 @@
1-
# Builds PEP files to HTML using docutils or sphinx
2-
# Also contains testing targets
3-
4-
PEP2HTML=pep2html.py
1+
# Builds PEP files to HTML using sphinx
52

63
PYTHON=python3
7-
84
VENV_DIR=venv
5+
RENDER_COMMAND=$(PYTHON) build.py -j $(SPHINX_JOBS)
6+
JOBS=8
97

10-
.SUFFIXES: .txt .html .rst
11-
12-
.txt.html:
13-
@$(PYTHON) $(PEP2HTML) $<
8+
render:
9+
$(RENDER_COMMAND)
1410

15-
.rst.html:
16-
@$(PYTHON) $(PEP2HTML) $<
11+
pages: rss
12+
$(RENDER_COMMAND) --build-dirs
1713

18-
TARGETS= $(patsubst %.rst,%.html,$(wildcard pep-????.rst)) $(patsubst %.txt,%.html,$(wildcard pep-????.txt)) pep-0000.html
19-
20-
all: pep-0000.rst $(TARGETS)
21-
22-
$(TARGETS): pep2html.py
14+
fail-warning:
15+
$(RENDER_COMMAND) --fail-on-warning
2316

24-
pep-0000.rst: $(wildcard pep-????.txt) $(wildcard pep-????.rst) $(wildcard pep0/*.py) genpepindex.py
25-
$(PYTHON) genpepindex.py .
17+
check-links:
18+
$(RENDER_COMMAND) --check-links
2619

2720
rss:
28-
$(PYTHON) pep2rss.py .
29-
30-
install:
31-
echo "Installing is not necessary anymore. It will be done in post-commit."
32-
33-
clean:
34-
-rm pep-0000.rst
35-
-rm *.html
36-
-rm -rf build
37-
38-
update:
39-
git pull https://github.com/python/peps.git
21+
$(PYTHON) generate_rss.py
4022

4123
venv:
4224
$(PYTHON) -m venv $(VENV_DIR)
4325
./$(VENV_DIR)/bin/python -m pip install -r requirements.txt
4426

45-
package: all rss
46-
mkdir -p build/peps
47-
cp pep-*.txt build/peps/
48-
cp pep-*.rst build/peps/
49-
cp *.html build/peps/
50-
cp *.png build/peps/
51-
cp *.rss build/peps/
52-
tar -C build -czf build/peps.tar.gz peps
53-
5427
lint:
5528
pre-commit --version > /dev/null || $(PYTHON) -m pip install pre-commit
5629
pre-commit run --all-files
5730

5831
spellcheck:
5932
pre-commit --version > /dev/null || $(PYTHON) -m pip install pre-commit
6033
pre-commit run --all-files --hook-stage manual codespell
61-
62-
# New Sphinx targets:
63-
64-
SPHINX_JOBS=8
65-
SPHINX_BUILD=$(PYTHON) build.py -j $(SPHINX_JOBS)
66-
67-
# TODO replace `rss:` with this when merged & tested
68-
pep_rss:
69-
$(PYTHON) generate_rss.py
70-
71-
pages: pep_rss
72-
$(SPHINX_BUILD) --build-dirs
73-
74-
sphinx:
75-
$(SPHINX_BUILD)
76-
77-
fail-warning:
78-
$(SPHINX_BUILD) --fail-on-warning
79-
80-
check-links:
81-
$(SPHINX_BUILD) --check-links

0 commit comments

Comments
 (0)