matplotlib has a agg graphics display option and it would be nice to be able to flip it on I have attached a sample path to this ticket which adds this use flag Reproducible: Always Steps to Reproduce: 1. emerge -v matplotlib 2. 3. --- /usr/portage/dev-python/matplotlib/matplotlib-0.90.1.ebuild 2007-08-18 22:36:37.000000000 -0400 +++ matplotlib-0.90.1.ebuild 2007-11-02 13:53:19.000000000 -0400 @@ -13,7 +13,7 @@ SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz doc? ( http://matplotlib.sourceforge.net/users_guide_${DOC_PV}.pdf )" -IUSE="doc examples gtk tk" +IUSE="doc examples gtk tk agg" SLOT="0" KEYWORDS="~amd64 ~ppc ~x86" LICENSE="PYTHON" @@ -28,6 +28,7 @@ media-libs/libpng sys-libs/zlib gtk? ( >=dev-python/pygtk-2.2 ) + agg? (x11-libs/agg) dev-python/pytz dev-python/python-dateutil" @@ -52,6 +53,7 @@ -e "/^BUILD_GTK/s/'auto'/$(use gtk && echo 1 || echo 0)/g" \ -e "/^BUILD_WX/s/'auto'/0/g" \ -e "/^BUILD_TK/s/'auto'/$(use tk && echo 1 || echo 0)/g" \ + -e "/^BUILD_AGG/s/'auto'/$(use agg && echo 1 || echo 0)/g" \ setup.py || die "sed autodetection failed" # default matplotlibrc in /etc
Hi Fred, matplotlib ships its own agg library, and is currently built by default. Unfortunately it is hard to make it depend on an external agg library. Disabling agg removes a lot of its capabilities. I am not sure an agg use flag would be useful. You can enable it in the matplotlibrc flag. Sébastien
(In reply to comment #1) > Hi Fred, > > matplotlib ships its own agg library, and is currently built by default. > Unfortunately it is hard to make it depend on an external agg library. It could probably be done through some modification of setupext.py and the inclusion of an agg section in site.cfg, but its not a priority upstream. An additional problem: agg-2.5 is distributed under the conditions of the GPL. Matplotlib distributes under conditions of a BSD-like license, so it will eventually distribute agg-2.4, but won't support 2.5. > Disabling agg removes a lot of its capabilities. I am not sure an agg use flag > would be useful. You can enable it in the matplotlibrc flag. Even the postscript and pdf backends require agg. I don't think an agg use flag is really appropriate.
> It could probably be done through some modification of setupext.py and the > inclusion of an agg section in site.cfg, but its not a priority upstream. An > additional problem: agg-2.5 is distributed under the conditions of the GPL. > Matplotlib distributes under conditions of a BSD-like license, so it will > eventually distribute agg-2.4, but won't support 2.5. I wonder why matplotlib needs to build its own agg, and not depend on a system agg. Is it a license problem?
(In reply to comment #3) > I wonder why matplotlib needs to build its own agg, and not depend on a system > agg. Is it a license problem? No, it's just an issue of convenience for people trying to install matplotlib. Most systems, like windows, don't already have agg installed.
> > I wonder why matplotlib needs to build its own agg, and not depend on a system > > agg. Is it a license problem? > > No, it's just an issue of convenience for people trying to install matplotlib. > Most systems, like windows, don't already have agg installed. Linux (at least Debian and Gentoo), FreeBSD, Macports, and the agg homepage boasts Windows archives. I think it could take advantage of system libs.
(In reply to comment #5) > > > I wonder why matplotlib needs to build its own agg, and not depend on a system > > > agg. Is it a license problem? > > > > No, it's just an issue of convenience for people trying to install matplotlib. > > Most systems, like windows, don't already have agg installed. > > Linux (at least Debian and Gentoo), FreeBSD, Macports, and the agg homepage > boasts Windows archives. I think it could take advantage of system libs. I gave a misleading answer. Agg was originally included in mpl simply for convenience. However, the situation has now changed. Agg-2.5 is released under the GPL license, and is not compatible with mpl's license. The mpl devs do not want to risk breaching the terms of the GPL, and therefore will continue to use its own Agg (version 2.3 at the moment, eventually 2.4) and will not use system libs. In the coming release, matplotlib can use a setup.cfg file to tailor the build and allow for certain system libs to be used instead of the ones bundled with mpl. These libs include pytz and dateutil, but definitely not Agg.
(In reply to comment #1) > Hi Fred, > > matplotlib ships its own agg library, and is currently built by default. > Unfortunately it is hard to make it depend on an external agg library. > > Disabling agg removes a lot of its capabilities. I am not sure an agg use flag > would be useful. You can enable it in the matplotlibrc flag. Just to clarify: The matplotlibrc flag sets the default backend at import time, but does not affect the build. After inspecting the mpl code, I have concluded that agg is currently absolutely required. Core modules depend on it, so the setup scripts no longer provide an option to skip the agg build. However, a lot of work is being done on a branch for a future release which would not require agg to be built. Disabling agg would remove much of matplotlib's capability. The non-GUI and end even a few of the GUI backends would still be usable. I could imagine an ebuild for that future version providing an agg, or better yet, a noagg USE flag.
Thanks for the clarification on agg. Will close as WONTFIX for now. Darren, if you guys upstream happen to change the agg situation to use system libs, let us know.