From: Mauro Carvalho Chehab <mchehab@s-opensource.com>
To: Markus Heiser <markus.heiser@darmarit.de>
Cc: Daniel Vetter <daniel@ffwll.ch>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Daniel Vetter <daniel.vetter@ffwll.ch>,
dri-devel <dri-devel@lists.freedesktop.org>,
Linux Doc Mailing List <linux-doc@vger.kernel.org>,
Jonathan Corbet <corbet@lwn.net>,
Daniel Vetter <daniel.vetter@intel.com>
Subject: Re: [PATCH 2/6] docs-rst: automatically convert Graphviz and SVG images
Date: Thu, 2 Mar 2017 12:45:32 -0300 [thread overview]
Message-ID: <20170302124532.65d4652e@vento.lan> (raw)
In-Reply-To: <33B82E3D-85F6-4AFA-960F-C26E7969D471@darmarit.de>
Em Thu, 2 Mar 2017 16:21:33 +0100
Markus Heiser <markus.heiser@darmarit.de> escreveu:
> Am 02.03.2017 um 16:11 schrieb Daniel Vetter <daniel@ffwll.ch>:
>
> > On Thu, Mar 02, 2017 at 03:58:36PM +0100, Markus Heiser wrote:
> >> Hi Daniel, Laurent
> >>
> >> Am 02.03.2017 um 15:14 schrieb Laurent Pinchart <laurent.pinchart@ideasonboard.com>:
> >>
> >>> Hi Daniel,
> >>>
> >>> On Thursday 02 Mar 2017 14:54:32 Daniel Vetter wrote:
> >>>> On Thu, Mar 2, 2017 at 1:26 PM, Laurent Pinchart wrote:
> >>>>> Hi Daniel,
> >>>>>
> >>>>> Thank you for the patch.
> >>>>>
> >>>>> With this applied, I get
> >>>>>
> >>>>> make[1]: Entering directory '/home/laurent/src/iob/renesas/linux64'
> >>>>>
> >>>>> SPHINX htmldocs -->
> >>>>> file:///home/laurent/src/iob/renesas/linux64/Documentation/output PARSE
> >>>>> include/uapi/linux/videodev2.h
> >>>>>
> >>>>> Running Sphinx v1.3.1
> >>>>>
> >>>>> Extension error:
> >>>>> Could not import extension kfigure (exception: cannot import name patches)
> >>>>> make[2]: ***
> >>>>> [/home/laurent/src/iob/renesas/linux/Documentation/Makefile.sphinx:70:
> >>>>> htmldocs] Error 1 make[1]: ***
> >>>>> [/home/laurent/src/iob/renesas/linux/Makefile:1453: htmldocs] Error 2
> >>>>> make[1]: Leaving directory '/home/laurent/src/iob/renesas/linux64' make:
> >>>>> *** [Makefile:152: sub-make] Error 2
> >>>>>
> >>>>> sphinx.directive.patches got introduced in Sphinx 1.4. If you want to bump
> >>>>> the minimum required version I think a notice is needed.
> >>>>
> >>>> Ugh. But this also goes completely over my head, no idea whether we
> >>>> must require sphinx 1.4 (it was released Mar 28, 2016), or whether
> >>>> there's some way to work around this ... Halp?
> >>>
> >>> I'm not a Sphinx expert so I don't know, but what I can tell is that copying
> >>> the patches.py from Sphinx 1.4 to Documentation/sphinx/ and modifying
> >>> kfigure.py to import it from there fixes the build. There's thus no extra
> >>> depencency on Sphinx 1.4 (or newer).
> >>>
> >>> I'm not sure we want to set a precedent by copying part of the Sphinx source
> >>> code to the kernel tree (or inlining the single small function that the module
> >>> provides), and I'll let someone more knowledgeable than me decide how to
> >>> proceed.
> >>
> >>
> >> Aargh ... we need virtualenv! For interim something like the following
> >> might help. In file Documentation/sphinx/kfigure.py edit the imports
> >>
> >> ...
> >> from docutils.parsers.rst.directives import images
> >> try:
> >> from sphinx.directives.patches import Figure
> >> except ImportError:
> >> Figure = images.Figure
> >> ...
> >>
> >> And fix the class definition, so it use 'Figure' and no
> >> longer 'patch.Figure'::
> >>
> >> ...
> >> -class KernelFigure(patches.Figure):
> >> +class KernelFigure(Figure):
> >> ...
> >>
> >> Sorry that I have not yet the time to send you a decent and tested
> >> patch. Do you like to test my suggestion? / thanks!
> >
> > I'll give it a shot at implementing it, but I can't (easily at least) test
> > on sphinx 1.3.
>
> You can test it with virtualenv https://virtualenv.pypa.io/en/stable/userguide/
>
> In short:
>
> $ cd kernel-src
> $ virtualenv myenv
> $ source myenv/bin/activate
> $ pip install 'Sphinx==1.3.1'
> $ make ....
Hmm... at least here, building docs-next with Sphinx 1.3.1 inside a
virtualenv is broken:
writing output... [ 16%] media/intro
Exception occurred:
File "/devel/v4l/patchwork/myenv-1.3/lib/python2.7/site-packages/docutils/writers/_html_base.py", line 671, in depart_document
assert not self.context, 'len(context) = %s' % len(self.context)
AssertionError: len(context) = 1
The full traceback has been saved in /tmp/sphinx-err-W7CPtT.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
Documentation/Makefile.sphinx:69: recipe for target 'htmldocs' failed
make[1]: *** [htmldocs] Error 1
Makefile:1450: recipe for target 'htmldocs' failed
make: *** [htmldocs] Error 2
Perhaps it is time for us to move minimal requirements to 1.4?
Thanks,
Mauro
next prev parent reply other threads:[~2017-03-02 15:45 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-28 17:13 [PATCH 0/6] more kernel-doc patches Daniel Vetter
2017-02-28 17:13 ` [PATCH 1/6] doc: Explain light-handed markup preference a bit better Daniel Vetter
2017-02-28 17:13 ` [PATCH 2/6] docs-rst: automatically convert Graphviz and SVG images Daniel Vetter
2017-03-01 15:56 ` Gabriel Krisman Bertazi
2017-03-02 7:12 ` Daniel Vetter
2017-03-02 8:23 ` Markus Heiser
2017-03-02 12:26 ` Laurent Pinchart
2017-03-02 13:54 ` Daniel Vetter
2017-03-02 14:14 ` Laurent Pinchart
2017-03-02 14:58 ` Markus Heiser
2017-03-02 15:11 ` Daniel Vetter
2017-03-02 15:17 ` Laurent Pinchart
2017-03-02 15:21 ` Markus Heiser
2017-03-02 15:45 ` Mauro Carvalho Chehab [this message]
2017-03-02 15:49 ` Mauro Carvalho Chehab
2017-03-02 16:13 ` Markus Heiser
2017-03-02 16:29 ` Mauro Carvalho Chehab
2017-03-02 18:16 ` Markus Heiser
2017-03-02 18:20 ` Jonathan Corbet
2017-03-02 18:47 ` Markus Heiser
2017-03-02 19:09 ` Mauro Carvalho Chehab
2017-03-02 20:16 ` Markus Heiser
2017-03-02 20:28 ` Mauro Carvalho Chehab
2017-03-04 14:56 ` docutils borkage (was: [PATCH 2/6] docs-rst: automatically convert Graphviz and SVG images) Jonathan Corbet
2017-03-05 2:23 ` Mauro Carvalho Chehab
2017-03-02 15:22 ` [PATCH 2/6] docs-rst: automatically convert Graphviz and SVG images Jonathan Corbet
2017-03-02 15:53 ` Daniel Vetter
2017-03-02 16:01 ` Mauro Carvalho Chehab
2017-03-02 19:49 ` Daniel Vetter
2017-03-06 10:12 ` Daniel Vetter
2017-03-06 13:13 ` Markus Heiser
2017-03-06 15:03 ` Daniel Vetter
2017-02-28 17:13 ` [PATCH 3/6] drm/doc: Add KMS overview graphs Daniel Vetter
2017-03-01 16:33 ` Gabriel Krisman Bertazi
2017-03-02 14:34 ` Laurent Pinchart
2017-03-02 15:06 ` Daniel Vetter
2017-02-28 17:13 ` [PATCH 4/6] drm/doc: Consistent kerneldoc include order Daniel Vetter
2017-02-28 23:39 ` Eric Anholt
2017-02-28 17:13 ` [PATCH 5/6] drm/doc: diagram for mode objects and properties Daniel Vetter
2017-02-28 23:40 ` Eric Anholt
2017-03-01 8:27 ` [PATCH] " Daniel Vetter
2017-03-01 16:45 ` Gabriel Krisman Bertazi
2017-03-02 14:42 ` Laurent Pinchart
2017-02-28 17:13 ` [PATCH 6/6] drm/doc: atomic overview, with graph Daniel Vetter
2017-02-28 23:48 ` Eric Anholt
2017-03-01 9:57 ` Daniel Vetter
2017-03-01 17:42 ` Gabriel Krisman Bertazi
2017-03-02 7:16 ` Daniel Vetter
2017-03-01 8:35 ` [PATCH] " Daniel Vetter
2017-03-01 17:42 ` Eric Anholt
2017-03-02 7:19 ` Daniel Vetter
2017-03-02 14:41 ` Laurent Pinchart
-- strict thread matches above, loose matches on Subject: below --
2017-03-02 15:16 [PATCH 1/6] doc: Explain light-handed markup preference a bit better Daniel Vetter
2017-03-02 15:16 ` [PATCH 2/6] docs-rst: automatically convert Graphviz and SVG images Daniel Vetter
2017-03-02 15:20 ` Laurent Pinchart
2017-03-02 22:15 ` Markus Heiser
2017-03-02 23:19 ` 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=20170302124532.65d4652e@vento.lan \
--to=mchehab@s-opensource.com \
--cc=corbet@lwn.net \
--cc=daniel.vetter@ffwll.ch \
--cc=daniel.vetter@intel.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-doc@vger.kernel.org \
--cc=markus.heiser@darmarit.de \
/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;
as well as URLs for NNTP newsgroup(s).