2022-03-10 03:27:31 -05:00
|
|
|
# Builds PEP files to HTML using sphinx
|
2009-01-27 15:05:05 -05:00
|
|
|
|
2017-02-13 13:47:14 -05:00
|
|
|
PYTHON=python3
|
2022-03-11 23:17:08 -05:00
|
|
|
VENVDIR=.venv
|
2022-03-10 03:27:31 -05:00
|
|
|
JOBS=8
|
2022-03-11 23:17:08 -05:00
|
|
|
RENDER_COMMAND=$(VENVDIR)/bin/python3 build.py -j $(JOBS)
|
2021-01-13 20:40:00 -05:00
|
|
|
|
2022-03-11 23:17:08 -05:00
|
|
|
render: venv
|
2022-03-10 03:27:31 -05:00
|
|
|
$(RENDER_COMMAND)
|
2000-09-06 21:29:32 -04:00
|
|
|
|
2022-03-11 23:17:08 -05:00
|
|
|
pages: venv rss
|
2022-03-10 03:27:31 -05:00
|
|
|
$(RENDER_COMMAND) --build-dirs
|
2016-06-23 18:57:01 -04:00
|
|
|
|
2022-03-11 23:17:08 -05:00
|
|
|
fail-warning: venv
|
2022-03-10 03:27:31 -05:00
|
|
|
$(RENDER_COMMAND) --fail-on-warning
|
2002-05-28 11:30:29 -04:00
|
|
|
|
2022-03-11 23:17:08 -05:00
|
|
|
check-links: venv
|
2022-03-10 03:27:31 -05:00
|
|
|
$(RENDER_COMMAND) --check-links
|
2009-01-07 22:53:19 -05:00
|
|
|
|
2022-03-11 23:17:08 -05:00
|
|
|
rss: venv
|
|
|
|
$(VENVDIR)/bin/python3 generate_rss.py
|
2000-11-03 10:42:20 -05:00
|
|
|
|
2022-03-11 23:17:08 -05:00
|
|
|
clean: clean-venv
|
2019-02-23 13:02:57 -05:00
|
|
|
-rm -rf build
|
2000-11-06 10:30:47 -05:00
|
|
|
|
2022-03-11 23:17:08 -05:00
|
|
|
clean-venv:
|
|
|
|
rm -rf $(VENVDIR)
|
2021-06-08 19:11:26 -04:00
|
|
|
|
2022-03-11 23:17:08 -05:00
|
|
|
venv:
|
|
|
|
@if [ -d $(VENVDIR) ] ; then \
|
|
|
|
echo "venv already exists."; \
|
|
|
|
echo "To recreate it, remove it first with \`make clean-venv'."; \
|
|
|
|
else \
|
|
|
|
$(PYTHON) -m venv $(VENVDIR); \
|
2022-03-28 02:11:30 -04:00
|
|
|
$(VENVDIR)/bin/python3 -m pip install -U pip wheel; \
|
2022-03-11 23:17:08 -05:00
|
|
|
$(VENVDIR)/bin/python3 -m pip install -r requirements.txt; \
|
|
|
|
echo "The venv has been created in the $(VENVDIR) directory"; \
|
|
|
|
fi
|
|
|
|
|
|
|
|
lint: venv
|
|
|
|
$(VENVDIR)/bin/python3 -m pre_commit --version > /dev/null || $(VENVDIR)/bin/python3 -m pip install pre-commit
|
|
|
|
$(VENVDIR)/bin/python3 -m pre_commit run --all-files
|
|
|
|
|
|
|
|
spellcheck: venv
|
|
|
|
$(VENVDIR)/bin/python3 -m pre_commit --version > /dev/null || $(VENVDIR)/bin/python3 -m pip install pre-commit
|
|
|
|
$(VENVDIR)/bin/python3 -m pre_commit run --all-files --hook-stage manual codespell
|