Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 665560 - dev-python/matplotlib-2.2.2-r1 should depend on dev-python/pygobject:3[${PYTHON_USEDEP},cairo]
Summary: dev-python/matplotlib-2.2.2-r1 should depend on dev-python/pygobject:3[${PYTH...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Science Related Packages
Depends on:
Reported: 2018-09-09 10:24 UTC by Teika kazura
Modified: 2020-01-26 01:19 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Teika kazura 2018-09-09 10:24:05 UTC
When dev-python/matplotlib-2.2.2-r1 is built with USE="gtk3 cairo", it requires pygobject built with USE=cairo i.e. RDEPEND should have "dev-python/pygobject:3[${PYTHON_USEDEP}, cairo]", which is lacking in the current ebuild.

If you re-emerge
$ USE="-cairo" emerge -1 dev-python/pygobject
then matplotlib fails with the message "TypeError: Couldn't find foreign struct converter for 'cairo.Context'". Sample code:

import matplotlib.pyplot as plt
plt.plot([1, 2])

<matplotlib source>//INSTALL.rst says:
  * `cairocffi <>`__ (>= v0.8): for cairo based backends;
  * `pycairo <>`_: for GTK3Cairo;

However, pycairo is not directly relevant; having it installed doesn't help. You need pygobject with USE=cairo.

Thanks maintainers. Best regards.
Comment 1 Larry the Git Cow gentoo-dev 2020-01-26 01:19:14 UTC
The bug has been closed via the following commit(s):

commit e099f966bfcfe82d06cf946568d6874ff37e1be4
Author:     Benda Xu <>
AuthorDate: 2020-01-26 01:13:40 +0000
Commit:     Benda Xu <>
CommitDate: 2020-01-26 01:19:01 +0000

    dev-python/matplotlib: bump to 3.1.2.
      - Unbundle qhull.
      - Depend on pyobject:3[cairo] for USE="gtk3 cairo".
      - p/arch/arm64/package.use.mask: mask USE=wxwidgets
        dev-python/wxpython does not have arm64 keyword.
    Package-Manager: Portage-2.3.79, Repoman-2.3.18
    Signed-off-by: Benda Xu <>

 dev-python/matplotlib/Manifest                     |   1 +
 .../matplotlib-3.1.2-no-jqueryui-download.patch    |  15 ++
 .../matplotlib/files/matplotlib-3.1.2-qhull.patch  |  20 ++
 dev-python/matplotlib/matplotlib-3.1.2.ebuild      | 244 +++++++++++++++++++++
 profiles/arch/arm64/package.use.mask               |   4 +
 5 files changed, 284 insertions(+)