Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
14 changes: 8 additions & 6 deletions Doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@

# You can set these variables from the command line.
PYTHON = python3
SPHINXBUILD = sphinx-build
BLURB = $(PYTHON) -m blurb
VENVDIR = ./venv
SPHINXBUILD = PATH=$(VENVDIR)/bin:$$PATH sphinx-build
BLURB = PATH=$(VENVDIR)/bin:$$PATH blurb
PAPER =
SOURCES =
DISTVERSION = $(shell $(PYTHON) tools/extensions/patchlevel.py)
Expand Down Expand Up @@ -118,11 +119,12 @@ htmlview: html
$(PYTHON) -c "import webbrowser; webbrowser.open('build/html/index.html')"

clean:
-rm -rf build/* venv/*
-rm -rf build/* $(VENVDIR)/*

venv:
$(PYTHON) -m venv venv
./venv/bin/python3 -m pip install -U Sphinx
$(PYTHON) -m venv $(VENVDIR)
$(VENVDIR)/bin/python3 -m pip install -U Sphinx blurb
@echo "The venv has been created in the $(VENVDIR) directory"

dist:
rm -rf dist
Expand Down Expand Up @@ -168,7 +170,7 @@ dist:
cp -pPR build/epub/Python.epub dist/python-$(DISTVERSION)-docs.epub

check:
$(PYTHON) tools/rstlint.py -i tools -i venv -i README.rst
$(PYTHON) tools/rstlint.py -i tools -i $(VENVDIR) -i README.rst

serve:
../Tools/scripts/serve.py build/html
Expand Down
4 changes: 4 additions & 0 deletions Doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@
# Require Sphinx 1.2 for build.
needs_sphinx = '1.2'

# Ignore any .rst files in the venv/ directory.
venvdir = os.getenv('VENVDIR', 'venv')
exclude_patterns = [venvdir+'/*', 'README.rst']


# Options for HTML output
# -----------------------
Expand Down