Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d5ea39d

Browse filesBrowse files
committed
Issue #22394: Add a 'venv' command to Doc/Makefile.
This will create a venv using the interpreter specified by the PYTHON variable for the Makefile that also install Sphinx. Typical usage is expected to be: cd Doc make venv PYTHON=../python make html PYTHON=venv/bin/python3
1 parent 1a7b8d1 commit d5ea39d
Copy full SHA for d5ea39d

File tree

Expand file treeCollapse file tree

4 files changed

+13
-8
lines changed
Filter options
Expand file treeCollapse file tree

4 files changed

+13
-8
lines changed

‎.gitignore

Copy file name to clipboardExpand all lines: .gitignore
+1-5Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,7 @@
99
*~
1010
.gdb_history
1111
Doc/build/
12-
Doc/tools/docutils/
13-
Doc/tools/jinja/
14-
Doc/tools/jinja2/
15-
Doc/tools/pygments/
16-
Doc/tools/sphinx/
12+
Doc/venv/
1713
Lib/lib2to3/*.pickle
1814
Lib/test/data/*
1915
Lib/_sysconfigdata.py

‎.hgignore

Copy file name to clipboardExpand all lines: .hgignore
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ TAGS$
99
autom4te.cache$
1010
^build/
1111
^Doc/build/
12+
^Doc/venv/
1213
buildno$
1314
config.cache
1415
config.log

‎Doc/Makefile

Copy file name to clipboardExpand all lines: Doc/Makefile
+7-3Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,12 @@ ALLSPHINXOPTS = -b $(BUILDER) -d build/doctrees -D latex_paper_size=$(PAPER) \
1515

1616
.PHONY: help build html htmlhelp latex text changes linkcheck \
1717
suspicious coverage doctest pydoc-topics htmlview clean dist check serve \
18-
autobuild-dev autobuild-stable
18+
autobuild-dev autobuild-stable venv
1919

2020
help:
2121
@echo "Please use \`make <target>' where <target> is one of"
2222
@echo " clean to remove build files"
23+
@echo " venv to create a venv with necessary tools"
2324
@echo " html to make standalone HTML files"
2425
@echo " htmlview to open the index page built by the html target in your browser"
2526
@echo " htmlhelp to make HTML files and a HTML help project"
@@ -102,7 +103,11 @@ htmlview: html
102103
$(PYTHON) -c "import webbrowser; webbrowser.open('build/html/index.html')"
103104

104105
clean:
105-
-rm -rf build/*
106+
-rm -rf build/* venv/*
107+
108+
venv:
109+
$(PYTHON) -m venv venv
110+
./venv/bin/python3 -m pip install -U Sphinx
106111

107112
dist:
108113
rm -rf dist
@@ -172,4 +177,3 @@ autobuild-stable:
172177
exit 1;; \
173178
esac
174179
@make autobuild-dev
175-

‎Misc/NEWS

Copy file name to clipboardExpand all lines: Misc/NEWS
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1348,6 +1348,10 @@ C API
13481348
Documentation
13491349
-------------
13501350

1351+
- Issue #22394: Doc/Makefile now supports ``make venv PYTHON=../python`` to
1352+
create a venv for generating the documentation, e.g.,
1353+
``make html PYTHON=venv/bin/python3``.
1354+
13511355
- Issue #21514: The documentation of the json module now refers to new JSON RFC
13521356
7159 instead of obsoleted RFC 4627.
13531357

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.