First, it should depend on dev-python/backports-functools-lru-cache, otherwise it fails with * python2_7: running distutils-r1_run_phase python_compile_all Traceback (most recent call last): File "./make.py", line 12, in <module> import matplotlib File "/var/tmp/portage/dev-python/matplotlib-2.1.0/work/matplotlib-2.1.0-python2_7/build/lib/matplotlib/__init__.py", line 128, in <module> from matplotlib.rcsetup import defaultParams, validate_backend, cycler File "/var/tmp/portage/dev-python/matplotlib-2.1.0/work/matplotlib-2.1.0-python2_7/build/lib/matplotlib/rcsetup.py", line 29, in <module> from matplotlib.fontconfig_pattern import parse_fontconfig_pattern File "/var/tmp/portage/dev-python/matplotlib-2.1.0/work/matplotlib-2.1.0-python2_7/build/lib/matplotlib/fontconfig_pattern.py", line 32, in <module> from backports.functools_lru_cache import lru_cache ImportError: No module named functools_lru_cache After installing backports-functools-lru-cache it fails with * python2_7: running distutils-r1_run_phase python_compile_all Traceback (most recent call last): File "./make.py", line 200, in <module> copy_if_out_of_date('../INSTALL.rst', 'users/installing.rst') File "./make.py", line 21, in copy_if_out_of_date shutil.copyfile(original, derived) File "/usr/lib/python2.7/shutil.py", line 96, in copyfile with open(src, 'rb') as fsrc: IOError: [Errno 2] No such file or directory: '../INSTALL.rst' Sorry for reporting 2 bugs at once; I can, of course, separate them, but the first one is fixed trivially.
Yes I was going to report on the first one. backport-functools-lru-cache is only under the test useflag when it should be at least a full runtime dependency for python2. Haven't seen the other one.
For me, the second failure (INSTALL.rst) only comes up when installing with USE=doc.
After patching doc/make.py to comment out the line copy_if_out_of_date('../INSTALL.rst', 'users/installing.rst') (because ../INSTALL.rst does not exist), the next failure is Exception occurred: File "/usr/lib64/python2.7/site-packages/sphinx_gallery/gen_gallery.py", line 217, in generate_gallery_rst .format(examples_dir)) IOError: Main example directory /var/tmp/portage/dev-python/matplotlib-2.1.0/work/matplotlib-2.1.0-python2_7/doc/../tutorials does not have a README.txt file. Please write one to introduce your gallery. The full traceback has been saved in /var/tmp/portage/dev-python/matplotlib-2.1.0/temp/sphinx-err-dUu5hy.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! Building HTML failed. make.py effectively calls (in /var/tmp/portage/dev-python/matplotlib-2.1.0/work/matplotlib-2.1.0-python2_7/doc, as a separate process, with python2) python -msphinx . build/html -j1 -bhtml -dbuild/doctrees -Dplot_formats=png:100 -W and this (when run by hand) produces exactly the above failure. No wonder: /var/tmp/portage/dev-python/matplotlib-2.1.0/work/matplotlib-2.1.0-python2_7/doc/../tutorials does not exist, and hence cannot contain README.txt. I'm now trying to understand how to convince sphinx not to consider the non-existing directory ../tutorials.
(In reply to Jan-Matthias Braun from comment #2) > For me, the second failure (INSTALL.rst) only comes up when installing with > USE=doc. Yes, of course. With USE=-doc everythings fine (after updating the dependency on backports-functools-lru-cache). I want to fix building with USE=doc.
In my case I have matplotlib compiled without backports-functools-lru-cache USE="cairo gtk3 latex wxwidgets -doc -examples -excel -gtk2 -pyside -qt5 {-test} -tk" PYTHON_TARGETS="python2_7 python3_4 -python3_5 -python3_6" But maybe because my main python interpreter in python3
(In reply to Pacho Ramos from comment #5) > In my case I have matplotlib compiled without backports-functools-lru-cache > USE="cairo gtk3 latex wxwidgets -doc -examples -excel -gtk2 -pyside -qt5 > {-test} -tk" PYTHON_TARGETS="python2_7 python3_4 -python3_5 -python3_6" > > But maybe because my main python interpreter in python3 i have the same as you with the only difference that my PYTHON_TARGETS are python2_7 and python3_5 instead of python3_4, and matplotlib-2.1.0 fails thus: /var/tmp/portage/dev-python/matplotlib-2.1.0/temp/environment: line 1807: 7170 Aborted "${@}" * ERROR: dev-python/matplotlib-2.1.0::gentoo failed (compile phase): * (no error message)
In my case USE="cairo doc latex qt5 tk wxwidgets -examples -excel -gtk2 -gtk3 -pyside {-test}" PYTHON_TARGETS="python2_7 python3_5 python3_6 -python3_4" Because of use doc && DISTUTILS_ALL_SUBPHASE_IMPLS=( python2.7 ) in pkg_setup(), with USE=doc backports-functools-lru-cache is needed. So, under what conditions we need to put it to DEPEND? Inside doc? ( ) and test? ( )? I've patched doc/conf.py, now the build (with USE=doc) proceeds much farther: all galleries are successfully built. The next failure is Warning, treated as error: /var/tmp/portage/dev-python/matplotlib-2.1.0/work/matplotlib-2.1.0-python2_7/doc/users/index.rst:12:toctree contains reference to nonexisting document u'users/installing' Now I'll try to patch doc/users/index.rst and re-run.
After a number of fixes, docs generation is now proceeding nearly up to the end. But at the end I get copying static files... done copying extra files... done dumping search index in English (code: en) ... done dumping object inventory... done build succeeded, 63 warnings. Embedding documentation hyperlinks in examples ... gallery[ 0%] index.html gallery[ 0%] 2dcollections3d.html Exception occurred: File "/usr/lib64/python2.7/anydbm.py", line 85, in open return mod.open(file, flag, mode) error: (11, 'Resource temporarily unavailable') The full traceback has been saved in /var/tmp/portage/dev-python/matplotlib-2.1.0/temp/sphinx-err-KYVDSp.log, if you want to report the issue to the developers. I don't know what to do next. I've asked the upstreem devel list, maybe, they will advice something.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7c1aeb6e0a5ea23b25e91dd641e6d6a7e1888b9f commit 7c1aeb6e0a5ea23b25e91dd641e6d6a7e1888b9f Author: Andrey Grozin <grozin@gentoo.org> AuthorDate: 2017-11-10 11:14:15 +0000 Commit: Andrey Grozin <grozin@gentoo.org> CommitDate: 2017-11-10 11:14:15 +0000 dev-python/matplotlib: replaced an incomplete 2.1.0 tarball by the full one The released source tarball of matplotlib-2.1.0 has many files missing. I've checked out the v2.1.0 tar from their git and prepared a better tarball. Closes: https://bugs.gentoo.org/636848 Package-Manager: Portage-2.3.13, Repoman-2.3.4 dev-python/matplotlib/Manifest | 1 + dev-python/matplotlib/matplotlib-2.1.0-r1.ebuild | 249 +++++++++++++++++++++++ 2 files changed, 250 insertions(+)