From: Daniele Varrazzo Date: Thu, 12 Nov 2020 02:57:58 +0000 (+0000) Subject: Added support to build docs unattended X-Git-Tag: 3.0.dev0~376 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6116b4f457a969dc0f8651d8300bd56b0374bab2;p=thirdparty%2Fpsycopg.git Added support to build docs unattended --- diff --git a/.gitignore b/.gitignore index 1abeb25fe..23ad50cdc 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /.mypy_cache __pycache__/ /docs/_build/ +/docs/env/ diff --git a/docs/Makefile b/docs/Makefile index d4bb2cbb9..ff619b429 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -7,14 +7,20 @@ SPHINXOPTS ?= SPHINXBUILD ?= sphinx-build SOURCEDIR = . BUILDDIR = _build +PYTHON ?= python3 # Put it first so that "make" without argument is like "make help". help: - @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) || true -.PHONY: help Makefile +.PHONY: help env Makefile + +env: requirements.txt + virtualenv -p $(PYTHON) env + ./env/bin/pip install -e ../psycopg3 + ./env/bin/pip install -r requirements.txt # Catch-all target: route all unknown targets to Sphinx using the new # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). %: Makefile - @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) || true diff --git a/docs/_static/.keep b/docs/_static/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/docs/_templates/.keep b/docs/_templates/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/docs/conf.py b/docs/conf.py index b3190381d..48b8994df 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -47,7 +47,7 @@ templates_path = ["_templates"] # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This pattern also affects html_static_path and html_extra_path. -exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] +exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "env"] # -- Options for HTML output -------------------------------------------------