Bug#866166: sagemath: FTBFS with Sphinx 1.5: AttributeError: 'BuildEnvironment' object has no attribute 'citations'

Dmitry Shachnev mitya57 at debian.org
Tue Jul 4 08:10:45 UTC 2017


Hi Ximin!

On Tue, Jul 04, 2017 at 07:35:00AM +0000, Ximin Luo wrote:
> I fixed our other issue in git and now I'm seeing these sphinxdoc errors:
>
> [..]
> make[1]: Entering directory '/home/infinity0/var/lib/sage/sagemath'
> dh_sphinxdoc -XMathJax.js -Xtranslations.js -Xsearchtools.js
> dh_sphinxdoc: ignoring unknown JavaScript code: debian/sagemath-doc-ca/usr/share/doc/sagemath/html/ca/intro/_static/thebe-sage.js
> [..]
> dh_sphinxdoc: debian/sagemath-doc-en/usr/share/doc/sagemath/html/en/reference/_sources/lie_algebras.rst.txt is missing
> debian/rules:199: recipe for target 'override_dh_sphinxdoc' failed
> make[1]: *** [override_dh_sphinxdoc] Error 2
>
> Dmitry, if we need to further patch Sphinx or Sage, I'd be happy to do that.
> But what exactly is needed? I'm not sure if I totally understood the ticket
> you linked:
>
> https://github.com/sphinx-doc/sphinx/pull/2454
>
> Do we just need to put the equivalent of this:
>
> https://github.com/mitya57/matplotlib/commit/53e6bc46d2f010f9a80e0c73dceb6166705f608f
>
> into Sage's layout templates?

No, the problem is not in the templates, the problem is with installation
layout.

dh_sphinxdoc (and searchtools.js) expect to to find the source files with the
following scheme: .../_sources/ + original filename (i.e. lie_algebras.rst) +
sourcelink_suffix if it is different from the original extension (i.e. .txt).

Here it fails to find these files. Most probably they are installed without
the sourcelink_suffix, i.e. .../_sources/lie_algebras.rst instead of
.../_sources/lie_algebras.rst.txt.

It looks like it installs using custom code in docbuild/ext/multidocs.py, not
by enabling the standard Sphinx’ html_copy_source configuration option.

Unfortunately I cannot test sagemath build locally because it exceeds my RAM,
but I can suggest two ways to potentially fix it:

* Add sourcelink_suffix support to multidocs.py (the “# Setup source symbolic
  links” block). It can be obtained from app.config.html_sourcelink_suffix.

* Or set html_sourcelink_suffix to '.rst' in conf.py. This way it should be
  the same as original extensions, so dh_sphinxdoc will not try to append it.

--
Dmitry Shachnev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/debian-science-maintainers/attachments/20170704/2d1e6003/attachment.sig>


More information about the debian-science-maintainers mailing list