changeset: 93739:888103600e72 user: Brett Cannon date: Fri Dec 05 15:17:31 2014 -0500 files: .gitignore .hgignore Doc/Makefile Misc/NEWS description: 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 diff -r 021c1df36910 -r 888103600e72 .gitignore --- a/.gitignore Fri Dec 05 11:01:30 2014 -0500 +++ b/.gitignore Fri Dec 05 15:17:31 2014 -0500 @@ -9,11 +9,7 @@ *~ .gdb_history Doc/build/ -Doc/tools/docutils/ -Doc/tools/jinja/ -Doc/tools/jinja2/ -Doc/tools/pygments/ -Doc/tools/sphinx/ +Doc/venv/ Lib/lib2to3/*.pickle Lib/test/data/* Lib/_sysconfigdata.py diff -r 021c1df36910 -r 888103600e72 .hgignore --- a/.hgignore Fri Dec 05 11:01:30 2014 -0500 +++ b/.hgignore Fri Dec 05 15:17:31 2014 -0500 @@ -9,6 +9,7 @@ autom4te.cache$ ^build/ ^Doc/build/ +^Doc/venv/ buildno$ config.cache config.log diff -r 021c1df36910 -r 888103600e72 Doc/Makefile --- a/Doc/Makefile Fri Dec 05 11:01:30 2014 -0500 +++ b/Doc/Makefile Fri Dec 05 15:17:31 2014 -0500 @@ -15,11 +15,12 @@ .PHONY: help build html htmlhelp latex text changes linkcheck \ suspicious coverage doctest pydoc-topics htmlview clean dist check serve \ - autobuild-dev autobuild-stable + autobuild-dev autobuild-stable venv help: @echo "Please use \`make ' where is one of" @echo " clean to remove build files" + @echo " venv to create a venv with necessary tools" @echo " html to make standalone HTML files" @echo " htmlview to open the index page built by the html target in your browser" @echo " htmlhelp to make HTML files and a HTML help project" @@ -102,7 +103,11 @@ $(PYTHON) -c "import webbrowser; webbrowser.open('build/html/index.html')" clean: - -rm -rf build/* + -rm -rf build/* venv/* + +venv: + $(PYTHON) -m venv venv + ./venv/bin/python3 -m pip install -U Sphinx dist: rm -rf dist @@ -172,4 +177,3 @@ exit 1;; \ esac @make autobuild-dev - diff -r 021c1df36910 -r 888103600e72 Misc/NEWS --- a/Misc/NEWS Fri Dec 05 11:01:30 2014 -0500 +++ b/Misc/NEWS Fri Dec 05 15:17:31 2014 -0500 @@ -1348,6 +1348,10 @@ Documentation ------------- +- Issue #22394: Doc/Makefile now supports ``make venv PYTHON=../python`` to + create a venv for generating the documentation, e.g., + ``make html PYTHON=venv/bin/python3``. + - Issue #21514: The documentation of the json module now refers to new JSON RFC 7159 instead of obsoleted RFC 4627.