File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed
Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change 55
66# You can set these variables from the command line.
77PYTHON = python3
8- SPHINXBUILD = sphinx-build
9- BLURB = $(PYTHON ) -m blurb
8+ VENVDIR = ./venv
9+ SPHINXBUILD = PATH=$(VENVDIR ) /bin:$$PATH sphinx-build
10+ BLURB = PATH=$(VENVDIR ) /bin:$$PATH blurb
1011PAPER =
1112SOURCES =
1213DISTVERSION = $(shell $(PYTHON ) tools/extensions/patchlevel.py)
@@ -118,11 +119,12 @@ htmlview: html
118119 $(PYTHON ) -c " import webbrowser; webbrowser.open('build/html/index.html')"
119120
120121clean :
121- -rm -rf build/* venv /*
122+ -rm -rf build/* $( VENVDIR ) /*
122123
123124venv :
124- $(PYTHON ) -m venv venv
125- ./venv/bin/python3 -m pip install -U Sphinx
125+ $(PYTHON ) -m venv $(VENVDIR )
126+ $(VENVDIR ) /bin/python3 -m pip install -U Sphinx blurb
127+ @echo " The venv has been created in the $( VENVDIR) directory"
126128
127129dist :
128130 rm -rf dist
@@ -168,7 +170,7 @@ dist:
168170 cp -pPR build/epub/Python.epub dist/python-$(DISTVERSION)-docs.epub
169171
170172check :
171- $(PYTHON ) tools/rstlint.py -i tools -i venv -i README.rst
173+ $(PYTHON ) tools/rstlint.py -i tools -i $( VENVDIR ) -i README.rst
172174
173175serve :
174176 ../Tools/scripts/serve.py build/html
Original file line number Diff line number Diff line change 3636# Require Sphinx 1.2 for build.
3737needs_sphinx = '1.2'
3838
39+ # Ignore any .rst files in the venv/ directory.
40+ venvdir = os .getenv ('VENVDIR' , 'venv' )
41+ exclude_patterns = [venvdir + '/*' , 'README.rst' ]
42+
3943
4044# Options for HTML output
4145# -----------------------
You can’t perform that action at this time.
0 commit comments