Bug#955065: theano: FTBFS with Sphinx 2.4: AttributeError: module 'sphinx' has no attribute 'build_main'

Lucas Nussbaum lucas at debian.org
Fri Mar 27 14:52:35 GMT 2020


Source: theano
Version: 1.0.4+dfsg-1
Severity: important
Tags: ftbfs
User: python-modules-team at lists.alioth.debian.org
Usertags: sphinx2.4

Hi,

theano fails to build with Sphinx 2.4, currently available in
experimental.

Relevant part (hopefully):
> make[2]: Entering directory '/<<PKGBUILDDIR>>/debian/missing-source/graphlib-dot'
> pegjs -e 'module.exports' src/dot-grammar.pegjs lib/dot-grammar.js
> cp build/graphlib-dot.js build/graphlib-dot.min.js dist
> make[2]: Leaving directory '/<<PKGBUILDDIR>>/debian/missing-source/graphlib-dot'
> cp debian/missing-source/graphlib-dot/dist/graphlib-dot.min.js theano/d3viz/js
> #dagre-d3.js
> browserify-lite ./debian/missing-source/dagre-d3/index.js --outfile debian/missing-source/dagre-d3.js --standalone dagreD3
> uglifyjs debian/missing-source/dagre-d3.js --comments '@license' -o theano/d3viz/js/dagre-d3.min.js
> #d3 - workaround for #745688
> uglifyjs /usr/share/javascript/d3/d3.js -m -c --comments '@license' -o theano/d3viz/js/d3.v3.min.js
> cp theano/d3viz/js/*.min.js doc/library/d3viz/examples/d3viz/js
> #the cython code is the only part of theano itself that needs building - the C code is runtime compiled
> cd /<<PKGBUILDDIR>>/theano/scan_module && cython3 scan_perform.pyx
> /usr/lib/python3/dist-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /<<PKGBUILDDIR>>/theano/scan_module/scan_perform.pyx
>   tree = Parsing.p_module(s, pxd, full_module_name)
> #remove relative paths from comments - they are unreproducible (depends on the number of levels in the build path) and probably wrong when installed
> cd /<<PKGBUILDDIR>>/theano/scan_module && sed -iE -e 's#/\* "[./]*usr/lib/#/\* "/usr/lib/#g' scan_perform.c
> #this patch is to code Cython copies from itself (Cython/Includes/numpy/__init__.pxd), that only exists in older versions - #918771
> cd /<<PKGBUILDDIR>>/theano/scan_module && dpkg --compare-versions `dpkg-query -f '${Version}' -W cython3` gt 0.29~ || patch --no-backup-if-mismatch scan_perform.c numpy_api_changes.diff
> cd /<<PKGBUILDDIR>>/theano/scan_module && mv scan_perform.c -t c_code
> #documentation
> sed -i -e "s/!pip/#!pip/g" doc/library/d3viz/index.ipynb
> mkdir jupyter_tmp
> #check that we can run this, but throw away the result because it's unreproducible (profiling output)
> cp /<<PKGBUILDDIR>>/doc/library/d3viz/index.ipynb jupyter_tmp && jupyter-nbconvert --to notebook --execute /<<PKGBUILDDIR>>/jupyter_tmp/index.ipynb --output /<<PKGBUILDDIR>>/jupyter_tmp/test.ipynb
> [NbConvertApp] Converting notebook /<<PKGBUILDDIR>>/jupyter_tmp/index.ipynb to notebook
> [NbConvertApp] Executing notebook with kernel: python3
> [NbConvertApp] Writing 187284 bytes to /<<PKGBUILDDIR>>/jupyter_tmp/test.ipynb
> #...but do use the ipynb-to-html-etc conversion
> jupyter-nbconvert --to html doc/library/d3viz/index.ipynb
> [NbConvertApp] Converting notebook doc/library/d3viz/index.ipynb to html
> [NbConvertApp] Writing 505642 bytes to doc/library/d3viz/index.html
> sed -i -e "s/#!pip/!pip/g" doc/library/d3viz/index.ipynb
> python3 doc/scripts/docgen.py
> Traceback (most recent call last):
>   File "doc/scripts/docgen.py", line 80, in <module>
>     call_sphinx('html', '.')
>   File "doc/scripts/docgen.py", line 73, in call_sphinx
>     ret = sphinx.build_main(['', '-b', builder] + extraopts + inopt)
> AttributeError: module 'sphinx' has no attribute 'build_main'
> make[1]: *** [debian/rules:45: override_dh_auto_build] Error 1

The full build log is available from:
   http://qa-logs.debian.net/2020/03/26/theano_1.0.4+dfsg-1_unstable_sphinx243.log

Please see [1] for Sphinx changelog, which may give a hint of what changes in
Sphinx caused this error.

Also see [2] for the list of deprecated/removed APIs and possible alternatives
to them.

Sphinx 2.4 is going to be uploaded to unstable in a couple of weeks. When that
happens, the severity of this bug will be bumped to serious.

In case you have questions, please Cc sphinx at packages.debian.org on reply.

[1]: https://www.sphinx-doc.org/en/2.0/changes.html
[2]: https://www.sphinx-doc.org/en/2.0/extdev/deprecated.html#dev-deprecated-apis

A list of current common problems and possible solutions is available at
http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute!

About the archive rebuild: The rebuild was done on EC2 VM instances from
Amazon Web Services, using a clean, minimal and up-to-date chroot. Every
failed build was retried once to eliminate random failures.



More information about the debian-science-maintainers mailing list