From: Mauro Carvalho Chehab <mchehab@s-opensource.com>
To: Linux Doc Mailing List <linux-doc@vger.kernel.org>
Cc: Mauro Carvalho Chehab <mchehab@s-opensource.com>,
Mauro Carvalho Chehab <mchehab@infradead.org>,
linux-kernel@vger.kernel.org, Jonathan Corbet <corbet@lwn.net>,
Daniel Vetter <daniel.vetter@ffwll.ch>,
Markus Heiser <markus.heiser@darmarit.de>,
SeongJae Park <sj38.park@gmail.com>
Subject: [PATCH 3/6] sphinx.rst: explain the usage of virtual environment
Date: Fri, 14 Jul 2017 08:08:20 -0300 [thread overview]
Message-ID: <4fc7e8fd44ff64de3fa4da68d3d3b9976746ec96.1500030250.git.mchehab@s-opensource.com> (raw)
In-Reply-To: <cover.1500030250.git.mchehab@s-opensource.com>
In-Reply-To: <cover.1500030250.git.mchehab@s-opensource.com>
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
next prev parent reply other threads:[~2017-07-14 11:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-14 11:08 [PATCH 0/6] Better document Sphinx install instructions Mauro Carvalho Chehab
2017-07-14 11:08 ` [PATCH 1/6] changes.rst: Update Sphinx minimal requirements Mauro Carvalho Chehab
2017-07-14 11:08 ` [PATCH 2/6] docs-rst: update Sphinx install instructions Mauro Carvalho Chehab
2017-07-14 15:44 ` Jonathan Corbet
2017-07-14 16:11 ` Markus Heiser
2017-07-14 11:08 ` Mauro Carvalho Chehab [this message]
2017-07-14 11:08 ` [PATCH 4/6] sphinx.rst: fix unknown reference Mauro Carvalho Chehab
2017-07-14 11:08 ` [PATCH 5/6] sphinx.rst: describe the install requirements for kfigure Mauro Carvalho Chehab
2017-07-14 11:08 ` [PATCH 6/6] sphinx.rst: better organize the documentation about PDF build Mauro Carvalho Chehab
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4fc7e8fd44ff64de3fa4da68d3d3b9976746ec96.1500030250.git.mchehab@s-opensource.com \
--to=mchehab@s-opensource.com \
--cc=corbet@lwn.net \
--cc=daniel.vetter@ffwll.ch \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=markus.heiser@darmarit.de \
--cc=mchehab@infradead.org \
--cc=sj38.park@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®