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 5
5
6
6
# You can set these variables from the command line.
7
7
PYTHON = 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
10
11
PAPER =
11
12
SOURCES =
12
13
DISTVERSION = $(shell $(PYTHON ) tools/extensions/patchlevel.py)
@@ -118,11 +119,12 @@ htmlview: html
118
119
$(PYTHON ) -c " import webbrowser; webbrowser.open('build/html/index.html')"
119
120
120
121
clean :
121
- -rm -rf build/* venv /*
122
+ -rm -rf build/* $( VENVDIR ) /*
122
123
123
124
venv :
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"
126
128
127
129
dist :
128
130
rm -rf dist
@@ -168,7 +170,7 @@ dist:
168
170
cp -pPR build/epub/Python.epub dist/python-$(DISTVERSION)-docs.epub
169
171
170
172
check :
171
- $(PYTHON ) tools/rstlint.py -i tools -i venv -i README.rst
173
+ $(PYTHON ) tools/rstlint.py -i tools -i $( VENVDIR ) -i README.rst
172
174
173
175
serve :
174
176
../Tools/scripts/serve.py build/html
Original file line number Diff line number Diff line change 36
36
# Require Sphinx 1.2 for build.
37
37
needs_sphinx = '1.2'
38
38
39
+ # Ignore any .rst files in the venv/ directory.
40
+ venvdir = os .getenv ('VENVDIR' , 'venv' )
41
+ exclude_patterns = [venvdir + '/*' , 'README.rst' ]
42
+
39
43
40
44
# Options for HTML output
41
45
# -----------------------
You can’t perform that action at this time.
0 commit comments