[issue22394] Update documentation building to use venv and pip

New submission from Brett Cannon:
Now that we have ensurepip, is there any reason to not have the Doc/ Makefile create a venv for building the docs instead of requiring people to install sphinx into either their global Python interpreter or some venv outside of their checkout? Basically it would be like going back to the old Makefile of checking out the code but instead do a better isolation job and let pip manage fetching everything, updating the projects, etc.
---------- assignee: docs@python components: Documentation messages: 226821 nosy: brett.cannon, docs@python priority: low severity: normal stage: needs patch status: open title: Update documentation building to use venv and pip type: enhancement versions: Python 3.5
_______________________________________ Python tracker report@bugs.python.org http://bugs.python.org/issue22394 _______________________________________

Changes by Tshepang Lekhonkhobe tshepang@gmail.com:
---------- nosy: +tshepang
_______________________________________ Python tracker report@bugs.python.org http://bugs.python.org/issue22394 _______________________________________

Brett Cannon added the comment:
I'm going to at least update the Makefile to have a ``make venv`` that will do the steps necessary to create a venv and then check out the necessary tools. It should also be set up so that running the command with a pre-existing venv will update it. This should all lead to commands like ``make html PYTHON=venv/bin/python3`` to work.
---------- assignee: docs@python -> brett.cannon
_______________________________________ Python tracker report@bugs.python.org http://bugs.python.org/issue22394 _______________________________________

Brett Cannon added the comment:
Attached is a patch against Doc/Makefile to add a venv command to create a venv that can be used to build the documentation. Georg, can you give me an LGTM so I can commit this?
---------- assignee: brett.cannon -> georg.brandl keywords: +patch nosy: +georg.brandl stage: needs patch -> patch review Added file: http://bugs.python.org/file37307/doc_venv.diff
_______________________________________ Python tracker report@bugs.python.org http://bugs.python.org/issue22394 _______________________________________

Georg Brandl added the comment:
Sure. (The PyPI name is uppercased, but I guess it doesn't matter.)
----------
_______________________________________ Python tracker report@bugs.python.org http://bugs.python.org/issue22394 _______________________________________

Changes by Brett Cannon brett@python.org:
---------- assignee: georg.brandl -> brett.cannon
_______________________________________ Python tracker report@bugs.python.org http://bugs.python.org/issue22394 _______________________________________

Roundup Robot added the comment:
New changeset 888103600e72 by Brett Cannon in branch 'default': Issue #22394: Add a 'venv' command to Doc/Makefile. https://hg.python.org/cpython/rev/888103600e72
---------- nosy: +python-dev
_______________________________________ Python tracker report@bugs.python.org http://bugs.python.org/issue22394 _______________________________________

Changes by Brett Cannon brett@python.org:
---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed
_______________________________________ Python tracker report@bugs.python.org http://bugs.python.org/issue22394 _______________________________________
participants (4)
-
Brett Cannon
-
Georg Brandl
-
Roundup Robot
-
Tshepang Lekhonkhobe