8000 bpo-31036: Allow sphinx and blurb to be found automatically by ned-deily · Pull Request #3440 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-31036: Allow sphinx and blurb to be found automatically #3440

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Sep 8, 2017
Prev Previous commit
Next Next commit
Document the make venv target for the docs
  • Loading branch information
brettcannon authored and ned-deily committed Sep 7, 2017
commit a5929bdf999709a8df350666f9f3d16a355ad79b
45 changes: 24 additions & 21 deletions Doc/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,38 +14,42 @@ developers guide.
Building the docs
=================

You need to have `Sphinx <http://sphinx-doc.org/>`_ installed; it is the toolset
used to build the docs. It is not included in this tree, but maintained
separately and `available from PyPI <https://pypi.python.org/pypi/Sphinx>`_.
The documentation is built with several tools which are not included in this
tree but are maintained separately and are available from
`PyPI <https://pypi.org/>`_.

* `Sphinx <https://pypi.org/project/Sphinx/>`_
* `blurb <https://pypi.org/project/blurb/>`_

Using make
----------
The easiest way to install these tools is to create a virtual environment and
install the tools into there.

A Makefile has been prepared so that on Unix, provided you have installed
Sphinx, you can just run ::

make html

to build the HTML output files.
Using make
----------

On Windows, we try to emulate the Makefile as closely as possible with a
``make.bat`` file.
To get started on UNIX, you can create a virtual environment with the command ::

To use a Python interpreter that's not called ``python``, use the standard
way to set Makefile variables, using e.g. ::
make venv

make html PYTHON=python3
That will install all the tools necessary to build the documentation. Assuming
the virtual e 8000 nvironment was created in the ``env`` directory (the default;
configurable with the VENVDIR variable), you can run the following command to
build the HTML output files::

On Windows, set the PYTHON environment variable instead.
make html PYTHON=./env/bin/python

To use a specific sphinx-build (something other than ``sphinx-build``), set
the SPHINXBUILD variable.
On Windows, we try to emulate the Makefile as closely as possible with a
``make.bat`` file. If you need to specify the Python interpreter to use,
set the PYTHON environment variable instead.

Available make targets are:

* "clean", which removes all build files.

* "venv", which creates a virtual environment with all necessary tools
installed.

* "html", which builds standalone HTML files for offline viewing.

* "htmlview", which re-uses the "html" builder, but then opens the main page
Expand Down Expand Up @@ -96,7 +100,7 @@ Available make targets are:
Without make
------------

Install the Sphinx package and its dependencies from PyPI.
First, install the tool dependencies from PyPI.

Then, from the ``Doc`` directory, run ::

Expand All @@ -112,8 +116,7 @@ Contributing
Bugs in the content should be reported to the
`Python bug tracker <https://bugs.python.org>`_.

Bugs in the toolset should be reported in the
`Sphinx bug tracker <https://github.com/sphinx-doc/sphinx/issues>`_.
Bugs in the toolset should be reported to the tools themselves.

You can also send a mail to the Python Documentation Team at docs@python.org,
and we will process your request as soon as possible.
Expand Down
0