-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
The PEP Rendering System is dead; long live the PEP Rendering System #2399
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,81 +1,36 @@ | ||
# Builds PEP files to HTML using docutils or sphinx | ||
# Also contains testing targets | ||
|
||
PEP2HTML=pep2html.py | ||
# Builds PEP files to HTML using sphinx | ||
|
||
PYTHON=python3 | ||
|
||
VENV_DIR=venv | ||
JOBS=8 | ||
RENDER_COMMAND=$(PYTHON) build.py -j $(JOBS) | ||
|
||
.SUFFIXES: .txt .html .rst | ||
|
||
.txt.html: | ||
@$(PYTHON) $(PEP2HTML) $< | ||
render: | ||
$(RENDER_COMMAND) | ||
|
||
.rst.html: | ||
@$(PYTHON) $(PEP2HTML) $< | ||
pages: rss | ||
$(RENDER_COMMAND) --build-dirs | ||
|
||
TARGETS= $(patsubst %.rst,%.html,$(wildcard pep-????.rst)) $(patsubst %.txt,%.html,$(wildcard pep-????.txt)) pep-0000.html | ||
|
||
all: pep-0000.rst $(TARGETS) | ||
|
||
$(TARGETS): pep2html.py | ||
fail-warning: | ||
$(RENDER_COMMAND) --fail-on-warning | ||
|
||
pep-0000.rst: $(wildcard pep-????.txt) $(wildcard pep-????.rst) $(wildcard pep0/*.py) genpepindex.py | ||
$(PYTHON) genpepindex.py . | ||
check-links: | ||
$(RENDER_COMMAND) --check-links | ||
|
||
rss: | ||
$(PYTHON) pep2rss.py . | ||
|
||
install: | ||
echo "Installing is not necessary anymore. It will be done in post-commit." | ||
$(PYTHON) generate_rss.py | ||
|
||
clean: | ||
AA-Turner marked this conversation as resolved.
Show resolved
Hide resolved
|
||
-rm pep-0000.rst | ||
-rm *.html | ||
-rm -rf build | ||
|
||
update: | ||
git pull https://github.com/python/peps.git | ||
|
||
venv: | ||
$(PYTHON) -m venv $(VENV_DIR) | ||
./$(VENV_DIR)/bin/python -m pip install -r requirements.txt | ||
|
||
package: all rss | ||
mkdir -p build/peps | ||
cp pep-*.txt build/peps/ | ||
cp pep-*.rst build/peps/ | ||
cp *.html build/peps/ | ||
cp *.png build/peps/ | ||
cp *.rss build/peps/ | ||
tar -C build -czf build/peps.tar.gz peps | ||
|
||
lint: | ||
pre-commit --version > /dev/null || $(PYTHON) -m pip install pre-commit | ||
pre-commit run --all-files | ||
|
||
spellcheck: | ||
pre-commit --version > /dev/null || $(PYTHON) -m pip install pre-commit | ||
pre-commit run --all-files --hook-stage manual codespell | ||
|
||
# New Sphinx targets: | ||
|
||
SPHINX_JOBS=8 | ||
SPHINX_BUILD=$(PYTHON) build.py -j $(SPHINX_JOBS) | ||
|
||
# TODO replace `rss:` with this when merged & tested | ||
pep_rss: | ||
$(PYTHON) generate_rss.py | ||
|
||
pages: pep_rss | ||
$(SPHINX_BUILD) --build-dirs | ||
|
||
sphinx: | ||
$(SPHINX_BUILD) | ||
|
||
fail-warning: | ||
$(SPHINX_BUILD) --fail-on-warning | ||
|
||
check-links: | ||
$(SPHINX_BUILD) --check-links |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.