Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1687565
| From | Mauro Carvalho Chehab <mchehab@s-opensource.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v2 3/6] sphinx.rst: explain the usage of virtual environment |
| Date | 2017-07-14 18:50 +0200 |
| Message-ID | <u3bWX-641-23@gated-at.bofh.it> (permalink) |
| References | <u3bWW-641-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
As the Sphinx build seems very fragile, specially for PDF output, add a notice about how to use it on a virtual environment. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> --- Documentation/doc-guide/sphinx.rst | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/Documentation/doc-guide/sphinx.rst b/Documentation/doc-guide/sphinx.rst index 1ee109b19322..3278262164da 100644 --- a/Documentation/doc-guide/sphinx.rst +++ b/Documentation/doc-guide/sphinx.rst @@ -28,6 +28,38 @@ The ReST markups currently used by the Documentation/ files are meant to be built with ``Sphinx`` version 1.3 or upper. If you're desiring to build PDF outputs, it is recommended to use version 1.4.6 or upper. +Most distributions are shipped with Sphinx, but its toolchain is fragile, +and it is not uncommon that upgrading it or some other Python packages +on your machine would cause the documentation build to break. + +A way to get rid of that is to use a different version than the one shipped +on your distributions. In order to do that, it is recommended to install +Sphinx inside a virtual environment, using ``virtualenv-3`` +or ``virtualenv``, depending on how your distribution packaged Python 3. + +.. note:: + + #) Sphinx versions below 1.5 don't work properly with Python's + docutils version 0.13.1 or upper. So, if you're willing to use + those versions, you should run ``pip install 'docutils==0.12'``. + + #) It is recommended to use the RTD theme for html output. Depending + on the Sphinx version, it should be installed in separate, + with ``pip install sphinx_rtd_theme``. + +In summary, if you want to install Sphinx version 1.4.9, you should do:: + + $ virtualenv sphinx_1.4 + $ . sphinx_1.4/bin/activate + (sphinx_1.4) $ pip install 'docutils==0.12' + (sphinx_1.4) $ pip install 'Sphinx==1.4.9' + (sphinx_1.4) $ pip install sphinx_rtd_theme + +After running ``. sphinx_1.4/bin/activate``, the prompt will change, +in order to indicate that you're using the new environment. If you +open a new shell, you need to rerun this command to enter again at +the virtual environment before building the documentation. + .. note:: Please notice that, for PDF and LaTeX output, you'll also need ``XeLaTeX`` -- 2.13.0
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 0/6] Better document Sphinx install instructions Mauro Carvalho Chehab <mchehab@s-opensource.com> - 2017-07-14 18:50 +0200
[PATCH v2 1/6] changes.rst: Update Sphinx minimal requirements Mauro Carvalho Chehab <mchehab@s-opensource.com> - 2017-07-14 18:50 +0200
[PATCH v2 5/6] sphinx.rst: describe the install requirements for kfigure Mauro Carvalho Chehab <mchehab@s-opensource.com> - 2017-07-14 18:50 +0200
[PATCH v2 3/6] sphinx.rst: explain the usage of virtual environment Mauro Carvalho Chehab <mchehab@s-opensource.com> - 2017-07-14 18:50 +0200
[PATCH v2 2/6] docs-rst: move Sphinx install instructions to sphinx.rst Mauro Carvalho Chehab <mchehab@s-opensource.com> - 2017-07-14 18:50 +0200
Re: [PATCH v2 0/6] Better document Sphinx install instructions Jonathan Corbet <corbet@lwn.net> - 2017-07-17 21:50 +0200
Re: [PATCH v2 0/6] Better document Sphinx install instructions Mauro Carvalho Chehab <mchehab@s-opensource.com> - 2017-07-17 23:30 +0200
Re: [PATCH v2 0/6] Better document Sphinx install instructions Jonathan Corbet <corbet@lwn.net> - 2017-07-17 23:30 +0200
Re: [PATCH v2 0/6] Better document Sphinx install instructions Mauro Carvalho Chehab <mchehab@s-opensource.com> - 2017-07-18 00:00 +0200
csiph-web