summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Fabbro <bicatali@gentoo.org>2013-04-25 16:27:34 +0000
committerSebastien Fabbro <bicatali@gentoo.org>2013-04-25 16:27:34 +0000
commitca66124656078e58d9c1d124cc73d7ab7128fd8b (patch)
tree41cd610f0504c6fbeadf8b2f531b3ec9d6127255 /dev-python/matplotlib
parentVersion bump (diff)
downloadgentoo-2-ca66124656078e58d9c1d124cc73d7ab7128fd8b.tar.gz
gentoo-2-ca66124656078e58d9c1d124cc73d7ab7128fd8b.tar.bz2
gentoo-2-ca66124656078e58d9c1d124cc73d7ab7128fd8b.zip
Version bump
(Portage version: 2.2.01.21890-prefix/cvs/Linux x86_64, signed Manifest commit with key 0x13CB1360)
Diffstat (limited to 'dev-python/matplotlib')
-rw-r--r--dev-python/matplotlib/ChangeLog11
-rw-r--r--dev-python/matplotlib/files/matplotlib-1.0.1-libpng15.patch71
-rw-r--r--dev-python/matplotlib/files/matplotlib-1.0.1-linux3.patch21
-rw-r--r--dev-python/matplotlib/files/matplotlib-1.0.1-sphinx.patch72
-rw-r--r--dev-python/matplotlib/matplotlib-1.0.1-r1.ebuild211
-rw-r--r--dev-python/matplotlib/matplotlib-1.1.0.ebuild210
-rw-r--r--dev-python/matplotlib/matplotlib-1.2.0-r1.ebuild180
-rw-r--r--dev-python/matplotlib/matplotlib-1.2.0.ebuild172
-rw-r--r--dev-python/matplotlib/matplotlib-1.2.1.ebuild201
9 files changed, 211 insertions, 938 deletions
diff --git a/dev-python/matplotlib/ChangeLog b/dev-python/matplotlib/ChangeLog
index 6766e303652c..f0f6123a1fb6 100644
--- a/dev-python/matplotlib/ChangeLog
+++ b/dev-python/matplotlib/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for dev-python/matplotlib
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/matplotlib/ChangeLog,v 1.146 2013/04/22 20:32:25 bicatali Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/matplotlib/ChangeLog,v 1.147 2013/04/25 16:27:34 bicatali Exp $
+
+*matplotlib-1.2.1 (25 Apr 2013)
+
+ 25 Apr 2013; Sébastien Fabbro <bicatali@gentoo.org> +matplotlib-1.2.1.ebuild,
+ -files/matplotlib-1.0.1-libpng15.patch, -files/matplotlib-1.0.1-linux3.patch,
+ -files/matplotlib-1.0.1-sphinx.patch, -matplotlib-1.0.1-r1.ebuild,
+ -matplotlib-1.1.0.ebuild, -matplotlib-1.2.0-r1.ebuild,
+ -matplotlib-1.2.0.ebuild:
+ Version bump
22 Apr 2013; Sébastien Fabbro <bicatali@gentoo.org> metadata.xml:
Added remote-id for upstream tracking
diff --git a/dev-python/matplotlib/files/matplotlib-1.0.1-libpng15.patch b/dev-python/matplotlib/files/matplotlib-1.0.1-libpng15.patch
deleted file mode 100644
index 2cd7d4f5037e..000000000000
--- a/dev-python/matplotlib/files/matplotlib-1.0.1-libpng15.patch
+++ /dev/null
@@ -1,71 +0,0 @@
---- src/_png.cpp.old 2010-10-12 18:14:42.000000000 +0200
-+++ src/_png.cpp 2011-02-12 01:33:14.000000000 +0100
-@@ -350,10 +350,10 @@
- png_set_sig_bytes(png_ptr, 8);
- png_read_info(png_ptr, info_ptr);
-
-- png_uint_32 width = info_ptr->width;
-- png_uint_32 height = info_ptr->height;
-+ png_uint_32 width, height;
-+ int bit_depth, color_type;
-
-- int bit_depth = info_ptr->bit_depth;
-+ png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, NULL, NULL, NULL);
-
- // Unpack 1, 2, and 4-bit images
- if (bit_depth < 8)
-@@ -361,7 +361,7 @@
-
- // If sig bits are set, shift data
- png_color_8p sig_bit;
-- if ((info_ptr->color_type != PNG_COLOR_TYPE_PALETTE) &&
-+ if ((color_type != PNG_COLOR_TYPE_PALETTE) &&
- png_get_sBIT(png_ptr, info_ptr, &sig_bit))
- {
- png_set_shift(png_ptr, sig_bit);
-@@ -374,19 +374,20 @@
- }
-
- // Convert palletes to full RGB
-- if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
-+ if (color_type == PNG_COLOR_TYPE_PALETTE)
- {
- png_set_palette_to_rgb(png_ptr);
- }
-
- // If there's an alpha channel convert gray to RGB
-- if (info_ptr->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
-+ if (color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
- {
- png_set_gray_to_rgb(png_ptr);
- }
-
- png_set_interlace_handling(png_ptr);
- png_read_update_info(png_ptr, info_ptr);
-+ color_type = png_get_color_type(png_ptr, info_ptr);
-
- /* read file */
- if (setjmp(png_jmpbuf(png_ptr)))
-@@ -408,11 +409,11 @@
- npy_intp dimensions[3];
- dimensions[0] = height; //numrows
- dimensions[1] = width; //numcols
-- if (info_ptr->color_type & PNG_COLOR_MASK_ALPHA)
-+ if (color_type & PNG_COLOR_MASK_ALPHA)
- {
- dimensions[2] = 4; //RGBA images
- }
-- else if (info_ptr->color_type & PNG_COLOR_MASK_COLOR)
-+ else if (color_type & PNG_COLOR_MASK_COLOR)
- {
- dimensions[2] = 3; //RGB images
- }
-@@ -421,7 +422,7 @@
- dimensions[2] = 1; //Greyscale images
- }
- //For gray, return an x by y array, not an x by y by 1
-- int num_dims = (info_ptr->color_type & PNG_COLOR_MASK_COLOR) ? 3 : 2;
-+ int num_dims = (color_type & PNG_COLOR_MASK_COLOR) ? 3 : 2;
-
- double max_value = (1 << ((bit_depth < 8) ? 8 : bit_depth)) - 1;
- PyArrayObject *A = (PyArrayObject *) PyArray_SimpleNew(
diff --git a/dev-python/matplotlib/files/matplotlib-1.0.1-linux3.patch b/dev-python/matplotlib/files/matplotlib-1.0.1-linux3.patch
deleted file mode 100644
index 8efe5ce11f24..000000000000
--- a/dev-python/matplotlib/files/matplotlib-1.0.1-linux3.patch
+++ /dev/null
@@ -1,21 +0,0 @@
---- setupext.py.orig 2011-08-09 06:33:33.000000000 +0100
-+++ setupext.py 2011-08-09 06:34:26.000000000 +0100
-@@ -54,6 +54,7 @@
- 'linux2-mips' : ['/usr/local', '/usr'],
- 'linux2-sparc' : ['/usr/local', '/usr'],
- 'linux2' : ['/usr/local', '/usr'],
-+ 'linux3' : ['/usr/local', '/usr'],
- 'linux' : ['/usr/local', '/usr',],
- 'cygwin' : ['/usr/local', '/usr',],
- '_darwin' : ['/sw/lib/freetype2', '/sw/lib/freetype219', '/usr/local',
---- examples/api/font_file.py.orig 2011-08-09 06:30:37.000000000 +0100
-+++ examples/api/font_file.py 2011-08-09 06:31:12.000000000 +0100
-@@ -17,7 +17,7 @@
-
- if sys.platform == 'win32':
- fpath = 'C:\\Windows\\Fonts\\Tahoma.ttf'
--elif sys.platform == 'linux2':
-+elif sys.platform.startswith('linux'):
- fonts = ['/usr/share/fonts/truetype/freefont/FreeSansBoldOblique.ttf',
- '/usr/share/fonts/truetype/ttf-liberation/LiberationSans-BoldItalic.ttf',
- '/usr/share/fonts/truetype/msttcorefonts/Comic_Sans_MS.ttf',
diff --git a/dev-python/matplotlib/files/matplotlib-1.0.1-sphinx.patch b/dev-python/matplotlib/files/matplotlib-1.0.1-sphinx.patch
deleted file mode 100644
index 5311b9cdf043..000000000000
--- a/dev-python/matplotlib/files/matplotlib-1.0.1-sphinx.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-diff -Nur matplotlib-1.0.1.orig/doc/api/api_changes.rst matplotlib-1.0.1/doc/api/api_changes.rst
---- matplotlib-1.0.1.orig/doc/api/api_changes.rst 2011-02-23 23:41:55.000000000 +0000
-+++ matplotlib-1.0.1/doc/api/api_changes.rst 2011-02-23 23:42:24.000000000 +0000
-@@ -540,7 +540,7 @@
-
- * :meth:`draw_markers(self, gc, marker_path, marker_trans, path,
- trans, rgbFace)
-- <matplotlib.backend_bases.RendererBase.draw_markers`
-+ <matplotlib.backend_bases.RendererBase.draw_markers>`
-
- * :meth:`draw_path_collection(self, master_transform, cliprect,
- clippath, clippath_trans, paths, all_transforms, offsets,
-diff -Nur matplotlib-1.0.1.orig/lib/matplotlib/sphinxext/plot_directive.py matplotlib-1.0.1/lib/matplotlib/sphinxext/plot_directive.py
---- matplotlib-1.0.1.orig/lib/matplotlib/sphinxext/plot_directive.py 2011-02-23 23:41:55.000000000 +0000
-+++ matplotlib-1.0.1/lib/matplotlib/sphinxext/plot_directive.py 2011-02-23 23:42:37.000000000 +0000
-@@ -346,7 +346,7 @@
- del options['nofigs']
-
- formats = setup.config.plot_formats
-- if type(formats) == str:
-+ if isinstance(formats, basestring):
- formats = eval(formats)
-
- fname = os.path.basename(plot_path)
-diff -Nur matplotlib-1.0.1.orig/lib/mpl_toolkits/axes_grid1/axes_divider.py matplotlib-1.0.1/lib/mpl_toolkits/axes_grid1/axes_divider.py
---- matplotlib-1.0.1.orig/lib/mpl_toolkits/axes_grid1/axes_divider.py 2011-02-23 23:41:55.000000000 +0000
-+++ matplotlib-1.0.1/lib/mpl_toolkits/axes_grid1/axes_divider.py 2011-02-23 23:42:31.000000000 +0000
-@@ -172,12 +172,12 @@
- def locate(self, nx, ny, nx1=None, ny1=None, renderer=None):
- """
-
-- :param nx, nx1: Integers specifying the column-position of the
-+ :param nx,nx1: Integers specifying the column-position of the
- cell. When nx1 is None, a single nx-th column is
- specified. Otherwise location of columns spanning between nx
- to nx1 (but excluding nx1-th column) is specified.
-
-- :param ny, ny1: same as nx and nx1, but for row positions.
-+ :param ny,ny1: same as nx and nx1, but for row positions.
- """
-
-
-@@ -222,12 +222,12 @@
- (:class:`mpl_toolkits.axes_grid.axes_divider.AxesLocator`) for
- specified cell.
-
-- :param nx, nx1: Integers specifying the column-position of the
-+ :param nx,nx1: Integers specifying the column-position of the
- cell. When nx1 is None, a single nx-th column is
- specified. Otherwise location of columns spanning between nx
- to nx1 (but excluding nx1-th column) is specified.
-
-- :param ny, ny1: same as nx and nx1, but for row positions.
-+ :param ny,ny1: same as nx and nx1, but for row positions.
- """
- return AxesLocator(self, nx, ny, nx1, ny1)
-
-@@ -242,12 +242,12 @@
- """
- :param axes_divider: An instance of AxesDivider class.
-
-- :param nx, nx1: Integers specifying the column-position of the
-+ :param nx,nx1: Integers specifying the column-position of the
- cell. When nx1 is None, a single nx-th column is
- specified. Otherwise location of columns spanning between nx
- to nx1 (but excluding nx1-th column) is is specified.
-
-- :param ny, ny1: same as nx and nx1, but for row positions.
-+ :param ny,ny1: same as nx and nx1, but for row positions.
- """
- self._axes_divider = axes_divider
-
diff --git a/dev-python/matplotlib/matplotlib-1.0.1-r1.ebuild b/dev-python/matplotlib/matplotlib-1.0.1-r1.ebuild
deleted file mode 100644
index 8f1fda00d579..000000000000
--- a/dev-python/matplotlib/matplotlib-1.0.1-r1.ebuild
+++ /dev/null
@@ -1,211 +0,0 @@
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/matplotlib/matplotlib-1.0.1-r1.ebuild,v 1.14 2013/01/06 19:20:12 idella4 Exp $
-
-EAPI="3"
-PYTHON_DEPEND="2"
-PYTHON_USE_WITH="tk"
-PYTHON_USE_WITH_OPT="tk"
-SUPPORT_PYTHON_ABIS="1"
-RESTRICT_PYTHON_ABIS="3.* *-jython"
-WX_GTK_VER="2.8"
-
-inherit distutils eutils
-
-DESCRIPTION="Pure python plotting library with matlab like syntax"
-HOMEPAGE="http://matplotlib.sourceforge.net/ http://pypi.python.org/pypi/matplotlib"
-SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz
- doc? ( mirror://gentoo/${PN}-sampledata.tar.bz2 )
- examples? ( mirror://gentoo/${PN}-sampledata.tar.bz2 )"
-
-IUSE="cairo doc excel examples fltk gtk latex qt4 traits tk wxwidgets"
-SLOT="0"
-KEYWORDS="amd64 ppc ~ppc64 x86 ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
-# Main license: matplotlib
-# Some modules: BSD
-# matplotlib/backends/qt4_editor: MIT
-# Fonts: BitstreamVera, OFL-1.1
-LICENSE="BitstreamVera BSD matplotlib MIT OFL-1.1"
-
-CDEPEND="dev-python/numpy
- dev-python/python-dateutil
- dev-python/pytz
- media-libs/freetype:2
- media-libs/libpng
- gtk? ( dev-python/pygtk )
- wxwidgets? ( dev-python/wxpython:2.8 )"
-
-DEPEND="${CDEPEND}
- dev-python/pycxx
- virtual/pkgconfig
- doc? (
- app-text/dvipng
- dev-python/imaging
- dev-python/ipython
- dev-python/xlwt
- dev-python/sphinx
- media-gfx/graphviz[cairo]
- dev-texlive/texlive-latexextra
- dev-texlive/texlive-fontsrecommended
- dev-texlive/texlive-latexrecommended
- )"
-
-RDEPEND="${CDEPEND}
- virtual/ttf-fonts
- media-fonts/stix-fonts
- media-fonts/texcm-ttf
- virtual/pyparsing
- cairo? ( dev-python/pycairo )
- excel? ( dev-python/xlwt )
- fltk? ( dev-python/pyfltk )
- qt4? ( dev-python/PyQt4[X] )
- traits? ( dev-python/traits dev-python/configobj )
- latex? (
- virtual/latex-base
- app-text/ghostscript-gpl
- app-text/dvipng
- app-text/poppler[utils]
- dev-texlive/texlive-fontsrecommended
- )"
-
-PYTHON_CFLAGS=("2.* + -fno-strict-aliasing")
-PYTHON_CXXFLAGS=("2.* + -fno-strict-aliasing")
-
-DOCS="INTERACTIVE"
-PYTHON_MODNAME="matplotlib mpl_toolkits pylab.py"
-
-use_setup() {
- local uword="${2}"
- [[ -z "${2}" ]] && uword="${1}"
- if use ${1}; then
- echo "${uword} = True"
- echo "${uword}agg = True"
- else
- echo "${uword} = False"
- echo "${uword}agg = False"
- fi
-}
-
-src_prepare() {
- # create setup.cfg (see setup.cfg.template for any changes)
- cat > setup.cfg <<-EOF
- [provide_packages]
- pytz = False
- dateutil = False
- configobj = False
- enthought.traits = False
- [gui_support]
- $(use_setup gtk)
- $(use_setup tk)
- $(use_setup wxwidgets wx)
- $(use_setup qt4)
- $(use_setup fltk)
- $(use_setup cairo)
- EOF
-
- # avoid checks needing a X display
- sed -i \
- -e "s/check_for_gtk()/$(use gtk && echo True || echo False)/" \
- -e "s/check_for_tk()/$(use tk && echo True || echo False)/" \
- setup.py || die "sed setup.py failed"
-
- # respect FHS:
- # - mpl-data in /usr/share/matplotlib
- # - config files in /etc/matplotlib
- sed -i \
- -e "/'mpl-data\/matplotlibrc',/d" \
- -e "/'mpl-data\/matplotlib.conf',/d" \
- -e "s:'lib/matplotlib/mpl-data/matplotlibrc':'matplotlibrc':" \
- -e "s:'lib/matplotlib/mpl-data/matplotlib.conf':'matplotlib.conf':" \
- setup.py \
- || die "sed setup.py for FHS failed"
-
- # remove internal copies of pycxx, pyparsing
- rm -rf CXX lib/matplotlib/pyparsing.py \
- || die "removed internal copies failed"
-
- # bug #334429 - also see https://developer.mozilla.org/en/Mozilla_MathML_Project/Fonts
- # which advise against bakoma fonts
- sed -i \
- -e '/fontset/s/cm/stix/' \
- lib/matplotlib/mpl-data/matplotlib.conf || die
-
- sed -i \
- -e 's/matplotlib.pyparsing/pyparsing/g' \
- lib/matplotlib/{mathtext,fontconfig_pattern}.py \
- || die "sed pyparsing failed"
-
- # some fixes to avoid fetching data while compiling examples in tests
- mv "${WORKDIR}"/sample_data examples/
- echo "examples.download : False" >> doc/matplotlibrc
- echo "examples.directory : ${S}/examples/sample_data" >> doc/matplotlibrc
- echo "examples.download : False" >> matplotlibrc.template
- echo "examples.directory : ${EPREFIX}/usr/share/${PF}/examples/sample_data" >> matplotlibrc.template
-
- epatch "${FILESDIR}"/${P}-libpng15.patch
- epatch "${FILESDIR}"/${P}-sphinx.patch
- epatch "${FILESDIR}"/${P}-linux3.patch
-}
-
-src_compile() {
- unset DISPLAY # bug #278524
- distutils_src_compile_pre_hook() {
- ln -fs "${EPREFIX}/usr/share/python$(python_get_version)/CXX" .
- }
- distutils_src_compile
-
- if use doc; then
- cd "${S}/doc"
- export VARTEXFONTS="${T}"/fonts
- MATPLOTLIBDATA="${S}/lib/matplotlib/mpl-data" \
- PYTHONPATH=$(ls -d "${S}"/build-$(PYTHON -f --ABI)/lib*) \
- "$(PYTHON -f)" make.py --small all
- [[ -e build/latex/Matplotlib.pdf ]] || die "doc generation failed"
- fi
-}
-
-src_test() {
- # if doc were enabled, all examples were built and tested
- use doc && return
- einfo "Tests are quite long, be patient"
- cd "${S}/examples/tests"
- testing() {
- PYTHONPATH=$(ls -d "${S}"/build-${PYTHON_ABI}/lib*) "$(PYTHON)" backend_driver.py agg || return 1
- PYTHONPATH=$(ls -d "${S}"/build-${PYTHON_ABI}/lib*) "$(PYTHON)" backend_driver.py --clean
- }
- python_execute_function testing
-}
-
-src_install() {
- # remove fonts bundles except some computer modern ones
- rm lib/matplotlib/mpl-data/fonts/ttf/cm{ex,mi,r,sy}10.ttf
- rm lib/matplotlib/mpl-data/fonts/ttf/{Vera*,*.TXT}
- rm lib/matplotlib/mpl-data/fonts/{afm,pdfcorefonts}
-
- # sed only after doc building, to allow using default configs
- sed -i \
- -e "s:path = get_data_path():path = '${EPREFIX}/etc/matplotlib':" \
- -e "s:os.path.dirname(__file__):'${EPREFIX}/usr/share/${PN}':g" \
- build-*/lib*/matplotlib/__init__.py \
- || die "sed init for FHS failed"
- distutils_src_install
-
- # Respect FHS
- dodir /usr/share/${PN}
- mv "${ED}$(python_get_sitedir -f)/${PN}/"{mpl-data,backends/Matplotlib.nib} \
- "${ED}usr/share/${PN}" || die "Renaming failed"
- rm -fr "${ED}"usr/lib*/python*/site-packages/${PN}/{mpl-data,backends/Matplotlib.nib}
-
- insinto /etc/matplotlib
- doins matplotlibrc matplotlib.conf || die "installing config files failed"
-
- # doc and examples
- insinto /usr/share/doc/${PF}
- if use doc; then
- doins doc/build/latex/Matplotlib.pdf || die
- doins -r doc/build/html || die
- fi
- if use examples; then
- doins -r examples || die
- fi
-}
diff --git a/dev-python/matplotlib/matplotlib-1.1.0.ebuild b/dev-python/matplotlib/matplotlib-1.1.0.ebuild
deleted file mode 100644
index 8614417cf866..000000000000
--- a/dev-python/matplotlib/matplotlib-1.1.0.ebuild
+++ /dev/null
@@ -1,210 +0,0 @@
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/matplotlib/matplotlib-1.1.0.ebuild,v 1.16 2013/01/06 19:20:12 idella4 Exp $
-
-EAPI="3"
-
-PYTHON_DEPEND="2"
-PYTHON_USE_WITH="tk"
-PYTHON_USE_WITH_OPT="tk"
-SUPPORT_PYTHON_ABIS="1"
-RESTRICT_PYTHON_ABIS="3.* *-jython 2.7-pypy-*"
-WX_GTK_VER="2.8"
-
-inherit distutils
-
-DESCRIPTION="Pure python plotting library with matlab like syntax"
-HOMEPAGE="http://matplotlib.sourceforge.net/ http://pypi.python.org/pypi/matplotlib"
-SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz
- doc? ( mirror://sourceforge/${PN}/mpl_sampledata-${PV}.tar.gz )
- examples? ( mirror://sourceforge/${PN}/mpl_sampledata-${PV}.tar.gz )"
-
-IUSE="cairo doc excel examples fltk gtk latex qt4 tk wxwidgets"
-SLOT="0"
-KEYWORDS="amd64 ppc ~ppc64 x86 ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
-# Main license: matplotlib
-# Some modules: BSD
-# matplotlib/backends/qt4_editor: MIT
-# Fonts: BitstreamVera, OFL-1.1
-LICENSE="BitstreamVera BSD matplotlib MIT OFL-1.1"
-
-CDEPEND="dev-python/numpy
- dev-python/python-dateutil
- dev-python/pytz
- media-libs/freetype:2
- media-libs/libpng
- gtk? ( dev-python/pygtk )
- wxwidgets? ( dev-python/wxpython:2.8 )"
-
-DEPEND="${CDEPEND}
- dev-python/pycxx
- virtual/pkgconfig
- doc? (
- app-text/dvipng
- dev-python/imaging
- dev-python/ipython
- dev-python/xlwt
- dev-python/sphinx
- media-gfx/graphviz[cairo]
- dev-texlive/texlive-latexextra
- dev-texlive/texlive-fontsrecommended
- dev-texlive/texlive-latexrecommended
- )"
-
-RDEPEND="${CDEPEND}
- virtual/ttf-fonts
- media-fonts/stix-fonts
- media-fonts/texcm-ttf
- virtual/pyparsing
- cairo? ( dev-python/pycairo )
- excel? ( dev-python/xlwt )
- fltk? ( dev-python/pyfltk )
- qt4? ( || ( dev-python/PyQt4[X] dev-python/pyside[X] ) )
- latex? (
- virtual/latex-base
- app-text/ghostscript-gpl
- app-text/dvipng
- app-text/poppler[utils]
- dev-texlive/texlive-fontsrecommended
- )"
-
-PYTHON_CFLAGS=("2.* + -fno-strict-aliasing")
-PYTHON_CXXFLAGS=("2.* + -fno-strict-aliasing")
-
-PYTHON_MODNAME="matplotlib mpl_toolkits pylab.py"
-
-use_setup() {
- local uword="${2:-${1}}"
- if use ${1}; then
- echo "${uword} = True"
- echo "${uword}agg = True"
- else
- echo "${uword} = False"
- echo "${uword}agg = False"
- fi
-}
-
-src_prepare() {
- # create setup.cfg (see setup.cfg.template for any changes)
- cat > setup.cfg <<-EOF
- [provide_packages]
- pytz = False
- dateutil = False
- [gui_support]
- $(use_setup cairo)
- $(use_setup fltk)
- $(use_setup gtk)
- $(use_setup qt4)
- $(use_setup tk)
- $(use_setup wxwidgets wx)
- EOF
-
- # avoid checks needing a X display
- sed -i \
- -e "s/check_for_gtk()/$(use gtk && echo True || echo False)/" \
- -e "s/check_for_tk()/$(use tk && echo True || echo False)/" \
- setup.py || die "sed setup.py failed"
-
- # respect FHS:
- # - mpl-data in /usr/share/matplotlib
- # - config files in /etc/matplotlib
- sed -i \
- -e "/'mpl-data\/matplotlibrc',/d" \
- -e "/'mpl-data\/matplotlib.conf',/d" \
- -e "s:'lib/matplotlib/mpl-data/matplotlibrc':'matplotlibrc':" \
- -e "s:'lib/matplotlib/mpl-data/matplotlib.conf':'matplotlib.conf':" \
- setup.py || die "sed setup.py for FHS failed"
-
- # remove internal copies of pycxx, pyparsing
- rm -rf CXX lib/matplotlib/pyparsing.py \
- || die "removed internal copies failed"
-
- # bug #334429 https://developer.mozilla.org/en/Mozilla_MathML_Project/Fonts
- # which advise against bakoma fonts
- sed -i \
- -e '/fontset/s/cm/stix/' \
- lib/matplotlib/mpl-data/matplotlib.conf* || die
-
- sed -i \
- -e 's/matplotlib.pyparsing/pyparsing/g' \
- lib/matplotlib/{mathtext,fontconfig_pattern}.py \
- || die "sed pyparsing failed"
-
- # some fixes to avoid fetching data while compiling examples in tests
- if use doc || use examples; then
- cat <<-EOF >> doc/matplotlibrc
- examples.download : False
- examples.directory : ${WORKDIR}/mpl_sampledata-${PV}
- EOF
- cat <<-EOF >> matplotlibrc.template
- examples.download : False
- examples.directory : ${EPREFIX}/usr/share/doc/${PF}/examples
- EOF
- fi
-}
-
-src_compile() {
- unset DISPLAY # bug #278524
- distutils_src_compile_pre_hook() {
- ln -fs "${EPREFIX}/usr/share/python$(python_get_version)/CXX" .
- }
- distutils_src_compile
-
- if use doc; then
- cd "${S}/doc"
- MATPLOTLIBDATA="${S}/lib/matplotlib/mpl-data" \
- VARTEXFONTS="${T}"/fonts \
- PYTHONPATH=$(ls -d "${S}"/build-$(PYTHON -f --ABI)/lib*) \
- "$(PYTHON -f)" make.py --small all
- [[ -e build/latex/Matplotlib.pdf ]] || die "doc generation failed"
- fi
-}
-
-src_test() {
- # if doc were enabled, all examples were built and tested
- use doc && return
- einfo "Tests are quite long, be patient"
- cd "${S}/examples/tests"
- testing() {
- PYTHONPATH=$(ls -d "${S}"/build-${PYTHON_ABI}/lib*) \
- "$(PYTHON)" backend_driver.py agg || return 1
- PYTHONPATH=$(ls -d "${S}"/build-${PYTHON_ABI}/lib*) \
- "$(PYTHON)" backend_driver.py --clean
- }
- python_execute_function testing
-}
-
-src_install() {
- # remove fonts bundles except some computer modern ones
- rm -f lib/matplotlib/mpl-data/fonts/ttf/cm{ex,mi,r,sy}10.ttf || die
- rm -f lib/matplotlib/mpl-data/fonts/ttf/{Vera*,*.TXT} || die
- rm -rf lib/matplotlib/mpl-data/fonts/{afm,pdfcorefonts} || die
-
- # sed only after doc building, to allow using default configs
- sed -i \
- -e "s:path = get_data_path():path = '${EPREFIX}/etc/matplotlib':" \
- -e "s:os.path.dirname(__file__):'${EPREFIX}/usr/share/${PN}':g" \
- build-*/lib*/matplotlib/__init__.py \
- || die "sed init for FHS failed"
- distutils_src_install
-
- # respect FHS
- dodir /usr/share/${PN}
- mv "${ED}$(python_get_sitedir -f)/${PN}/"{mpl-data,backends/Matplotlib.nib} \
- "${ED}usr/share/${PN}" || die "Renaming failed"
- rm -fr "${ED}"usr/lib*/*/site-packages/${PN}/{mpl-data,backends/Matplotlib.nib}
-
- insinto /etc/matplotlib
- doins matplotlibrc matplotlib.conf
-
- # doc and examples
- if use doc; then
- insinto /usr/share/doc/${PF}
- doins -r doc/build/latex/Matplotlib.pdf doc/build/html || die
- fi
- if use examples; then
- insinto /usr/share/doc/${PF}/examples
- doins -r "${WORKDIR}"/mpl_sampledata-${PV}/* || die
- fi
-
-}
diff --git a/dev-python/matplotlib/matplotlib-1.2.0-r1.ebuild b/dev-python/matplotlib/matplotlib-1.2.0-r1.ebuild
deleted file mode 100644
index 3e37f7fd6fb6..000000000000
--- a/dev-python/matplotlib/matplotlib-1.2.0-r1.ebuild
+++ /dev/null
@@ -1,180 +0,0 @@
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/matplotlib/matplotlib-1.2.0-r1.ebuild,v 1.5 2013/02/02 01:17:03 mr_bones_ Exp $
-
-EAPI="3"
-
-PYTHON_DEPEND="*:2.6"
-PYTHON_USE_WITH="tk"
-PYTHON_USE_WITH_OPT="tk"
-SUPPORT_PYTHON_ABIS="1"
-RESTRICT_PYTHON_ABIS="3.3 *-jython 2.7-pypy-*"
-PYTHON_TESTS_RESTRICTED_ABIS="2.[56] 3.1"
-DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES="1"
-PYTHON_CFLAGS=("2.* + -fno-strict-aliasing" "3.* + -fno-strict-aliasing")
-PYTHON_CXXFLAGS=("2.* + -fno-strict-aliasing" "3.* + -fno-strict-aliasing")
-PYTHON_MODNAME="matplotlib mpl_toolkits pylab.py"
-
-WX_GTK_VER="2.8"
-
-inherit distutils eutils
-
-DESCRIPTION="Pure python plotting library with matlab like syntax"
-HOMEPAGE="http://matplotlib.org/ http://pypi.python.org/pypi/matplotlib"
-SRC_URI="mirror://github/${PN}/${PN}/${P}.tar.gz"
-
-IUSE="cairo doc excel examples fltk gtk gtk3 latex qt4 test tk wxwidgets"
-SLOT="0"
-KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
-
-# Main license: matplotlib
-# Some modules: BSD
-# matplotlib/backends/qt4_editor: MIT
-# Fonts: BitstreamVera, OFL-1.1
-LICENSE="BitstreamVera BSD matplotlib MIT OFL-1.1"
-
-CDEPEND="dev-python/numpy
- dev-python/python-dateutil
- dev-python/pytz
- dev-python/six
- media-fonts/stix-fonts
- media-libs/freetype:2
- media-libs/libpng
- gtk? ( dev-python/pygtk )
- gtk3? ( dev-python/pygobject:3
- x11-libs/gtk+:3[introspection] )
- wxwidgets? ( dev-python/wxpython:2.8 )"
-
-# internal copy of pycxx highly patched
-# dev-python/pycxx
-
-DEPEND="${CDEPEND}
- virtual/pkgconfig
- doc? (
- app-text/dvipng
- dev-python/imaging
- dev-python/ipython
- dev-python/xlwt
- dev-python/sphinx
- dev-texlive/texlive-latexextra
- dev-texlive/texlive-fontsrecommended
- dev-texlive/texlive-latexrecommended
- media-gfx/graphviz[cairo]
- )
- test? ( dev-python/nose )"
-
-RDEPEND="${CDEPEND}
- virtual/pyparsing
- cairo? ( dev-python/pycairo )
- excel? ( dev-python/xlwt )
- fltk? ( dev-python/pyfltk )
- latex? (
- virtual/latex-base
- app-text/ghostscript-gpl
- app-text/dvipng
- app-text/poppler[utils]
- dev-texlive/texlive-fontsrecommended
- )
- qt4? ( || ( dev-python/PyQt4[X] dev-python/pyside[X] ) )"
-
-RESTRICT="mirror"
-
-use_setup() {
- local uword="${2:-${1}}"
- if use ${1}; then
- echo "${uword} = True"
- echo "${uword}agg = True"
- else
- echo "${uword} = False"
- echo "${uword}agg = False"
- fi
-}
-
-src_prepare() {
- # create setup.cfg (see setup.cfg.template for any changes), default to py2.
- cat > setup.cfg <<-EOF
- [provide_packages]
- pytz = False
- dateutil = False
- [gui_support]
- six = False
- $(use_setup cairo)
- $(use_setup fltk)
- $(use_setup gtk)
- $(use_setup qt4)
- $(use_setup tk)
- $(use_setup wxwidgets wx)
- EOF
- distutils_src_prepare
- SetSetup() {
- if [[ "$(python_get_version --major)" == '3' ]]; then
- sed -e 's:^gtk = True:gtk = False:' \
- -e 's:^gtkagg = True:gtkagg = False:' \
- -e 's:^wx = True:wx = False:' \
- -e 's:^wxagg = True:wxagg = False:' \
- -e 's:^six = False:six = True:' \
- -i setup.cfg || die
- fi
-
- # avoid checks needing a X display
- epatch "${FILESDIR}"/${P}-setup.patch
-
- # Fix test, issue no. 1532
- epatch "${FILESDIR}"/${P}-ft-refcount.patch
-
- # remove internal copies of pyparsing
- rm lib/matplotlib/pyparsing{_py2,_py3}.py || die
- sed -i -e 's/matplotlib.pyparsing_py[23]/pyparsing/g' \
- lib/matplotlib/{mathtext,fontconfig_pattern}.py \
- || die "sed pyparsing failed"
-
- }
- python_execute_function -q -s SetSetup
-}
-
-src_compile() {
- unset DISPLAY # bug #278524
- distutils_src_compile
- buildDocs() {
- if [[ "$(python_get_version --major)" == '2' ]]; then
- pushd doc > /dev/null
- VARTEXFONTS="${T}"/fonts \
- PYTHONPATH=$(ls -d "${WORKDIR}"/${P}-${PYTHON_ABI}/build/lib.linux*-${PYTHON_ABI}/) \
- $(PYTHON) ./make.py --small all
- [[ -e build/latex/Matplotlib.pdf ]] || die "doc generation failed"
- popd > /dev/null
- fi
- }
- use doc && python_execute_function buildDocs
-}
-
-src_test() {
- # if doc was enabled, all examples were built and tested
- use doc && return
- testing() {
- mkdir test-${PYTHON_ABI}
- "$(PYTHON)" setup.py build -b "build-${PYTHON_ABI}" install \
- --home="./test-${PYTHON_ABI}" --no-compile \
- || die "install test failed"
- pushd test-${PYTHON_ABI}/lib/ > /dev/null
- PYTHONPATH=python \
- "$(PYTHON)" -c "import matplotlib as m; m.test(verbosity=2)" \
- 2>&1 | tee test.log
- grep -Eq "^(ERROR|FAIL):" test.log && return 1
- popd > /dev/null
- rm -r test-${PYTHON_ABI}
- }
- python_execute_function -s testing
-}
-
-src_install() {
- distutils_src_install
- if use doc; then
- insinto /usr/share/doc/${PF}
- doins -r doc/build/latex/Matplotlib.pdf doc/build/html || die
- fi
- if use examples; then
- insinto /usr/share/doc/${PF}
- doins -r examples || die
- fi
-}
diff --git a/dev-python/matplotlib/matplotlib-1.2.0.ebuild b/dev-python/matplotlib/matplotlib-1.2.0.ebuild
deleted file mode 100644
index c5137d0bf396..000000000000
--- a/dev-python/matplotlib/matplotlib-1.2.0.ebuild
+++ /dev/null
@@ -1,172 +0,0 @@
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/matplotlib/matplotlib-1.2.0.ebuild,v 1.6 2013/01/09 22:10:03 jlec Exp $
-
-EAPI="3"
-
-PYTHON_DEPEND="*:2.6"
-PYTHON_USE_WITH="tk"
-PYTHON_USE_WITH_OPT="tk"
-SUPPORT_PYTHON_ABIS="1"
-RESTRICT_PYTHON_ABIS="3.3 *-jython 2.7-pypy-*"
-PYTHON_TESTS_RESTRICTED_ABIS="2.[56] 3.1"
-PYTHON_CFLAGS=("2.* + -fno-strict-aliasing" "3.* + -fno-strict-aliasing")
-PYTHON_CXXFLAGS=("2.* + -fno-strict-aliasing" "3.* + -fno-strict-aliasing")
-PYTHON_MODNAME="matplotlib mpl_toolkits pylab.py"
-
-WX_GTK_VER="2.8"
-
-inherit distutils eutils
-
-DESCRIPTION="Pure python plotting library with matlab like syntax"
-HOMEPAGE="http://matplotlib.org/ http://pypi.python.org/pypi/matplotlib"
-SRC_URI="mirror://github/${PN}/${PN}/${P}.tar.gz"
-
-IUSE="cairo doc excel examples fltk gtk latex qt4 test tk wxwidgets"
-SLOT="0"
-KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
-
-# Main license: matplotlib
-# Some modules: BSD
-# matplotlib/backends/qt4_editor: MIT
-# Fonts: BitstreamVera, OFL-1.1
-LICENSE="BitstreamVera BSD matplotlib MIT OFL-1.1"
-
-CDEPEND="dev-python/numpy
- dev-python/python-dateutil
- dev-python/pytz
- media-libs/freetype:2
- media-libs/libpng
- gtk? ( dev-python/pygtk
- || ( >=dev-lang/python-3.2 dev-python/pygtk:3 ) )
- wxwidgets? ( dev-python/wxpython:2.8 )"
-
-# internal copy of pycxx highly patched
-# dev-python/pycxx
-
-DEPEND="${CDEPEND}
- virtual/pkgconfig
- doc? (
- app-text/dvipng
- dev-python/imaging
- dev-python/ipython
- dev-python/xlwt
- dev-python/sphinx
- dev-texlive/texlive-latexextra
- dev-texlive/texlive-fontsrecommended
- dev-texlive/texlive-latexrecommended
- media-gfx/graphviz[cairo]
- )
- test? ( dev-python/nose )"
-
-RDEPEND="${CDEPEND}
- virtual/pyparsing
- cairo? ( dev-python/pycairo )
- excel? ( dev-python/xlwt )
- fltk? ( dev-python/pyfltk )
- latex? (
- virtual/latex-base
- app-text/ghostscript-gpl
- app-text/dvipng
- app-text/poppler[utils]
- dev-texlive/texlive-fontsrecommended
- )
- qt4? ( || ( dev-python/PyQt4[X] dev-python/pyside[X] ) )"
-
-RESTRICT="mirror"
-
-use_setup() {
- local uword="${2:-${1}}"
- if use ${1}; then
- echo "${uword} = True"
- echo "${uword}agg = True"
- else
- echo "${uword} = False"
- echo "${uword}agg = False"
- fi
-}
-
-src_prepare() {
- # create setup.cfg (see setup.cfg.template for any changes)
- cat > setup.cfg <<-EOF
- [provide_packages]
- pytz = False
- dateutil = False
- six = False
- [gui_support]
- $(use_setup cairo)
- $(use_setup fltk)
- $(use_setup gtk)
- $(use_setup qt4)
- $(use_setup tk)
- $(use_setup wxwidgets wx)
- EOF
-
- # avoid checks needing a X display
- epatch "${FILESDIR}"/${P}-setup.patch
-
- # Fix test, issue no. 1532
- epatch "${FILESDIR}"/${P}-ft-refcount.patch
-
- # remove internal copies of pyparsing
- rm lib/matplotlib/pyparsing{_py2,_py3}.py || die
- sed -i -e 's/matplotlib.pyparsing_py[23]/pyparsing/g' \
- lib/matplotlib/{mathtext,fontconfig_pattern}.py \
- || die "sed pyparsing failed"
-
- DocCheck() {
- if [[ "$(python_get_version --major)" == '3' ]] && use doc; then
- eerror ""
- eerror "Building of docs with python3 currently **FAILS**"
- eerror "Docs can be built effectively with python2."
- eerror "eselect python2 and recommence emerge "
- eerror ""
- die
- fi
- }
- python_execute_function DocCheck
- distutils_src_prepare
-}
-
-src_compile() {
- unset DISPLAY # bug #278524
- distutils_src_compile
- if use doc; then
- pushd doc > /dev/null
- VARTEXFONTS="${T}"/fonts \
- PYTHONPATH=$(ls -d "${S}"/build-$(PYTHON -f --ABI)/lib*) \
- ./make.py --small all
- [[ -e build/latex/Matplotlib.pdf ]] || die "doc generation failed"
- popd > /dev/null
- fi
-}
-
-src_test() {
- # if doc was enabled, all examples were built and tested
- use doc && return
- testing() {
- "$(PYTHON)" setup.py build -b "build-${PYTHON_ABI}" install \
- --home="${S}/test-${PYTHON_ABI}" --no-compile \
- || die "install test failed"
- pushd "${S}/test-${PYTHON_ABI}/"lib* > /dev/null
- PYTHONPATH=python \
- "$(PYTHON)" -c "import matplotlib as m; m.test(verbosity=2)" \
- 2>&1 | tee test.log
- grep -Eq "^(ERROR|FAIL):" test.log && return 1
- popd > /dev/null
- rm -r test-${PYTHON_ABI}
- }
- python_execute_function testing
-}
-
-src_install() {
- distutils_src_install
- if use doc; then
- insinto /usr/share/doc/${PF}
- doins -r doc/build/latex/Matplotlib.pdf doc/build/html || die
- fi
- if use examples; then
- insinto /usr/share/doc/${PF}
- doins -r examples || die
- fi
-}
diff --git a/dev-python/matplotlib/matplotlib-1.2.1.ebuild b/dev-python/matplotlib/matplotlib-1.2.1.ebuild
new file mode 100644
index 000000000000..2ff7cf56b522
--- /dev/null
+++ b/dev-python/matplotlib/matplotlib-1.2.1.ebuild
@@ -0,0 +1,201 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/matplotlib/matplotlib-1.2.1.ebuild,v 1.1 2013/04/25 16:27:34 bicatali Exp $
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_6,2_7,3_1,3_2,3_3} )
+PYTHON_REQ_USE='tk?'
+
+inherit distutils-r1 eutils flag-o-matic
+
+DESCRIPTION="Pure python plotting library with matlab like syntax"
+HOMEPAGE="http://matplotlib.org/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+IUSE="cairo doc excel examples fltk gtk gtk3 latex qt4 test tk wxwidgets"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+
+# Main license: matplotlib
+# Some modules: BSD
+# matplotlib/backends/qt4_editor: MIT
+# Fonts: BitstreamVera, OFL-1.1
+LICENSE="BitstreamVera BSD matplotlib MIT OFL-1.1"
+
+# #456704 -- a lot of py2-only deps
+PY2_USEDEP=$(python_gen_usedep 'python2*')
+COMMON_DEPEND="
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-python/python-dateutil[${PYTHON_USEDEP}]
+ dev-python/pytz[${PYTHON_USEDEP}]
+ dev-python/six[${PYTHON_USEDEP}]
+ media-fonts/stix-fonts
+ media-libs/freetype:2
+ media-libs/libpng
+ gtk? ( dev-python/pygtk[${PY2_USEDEP}] )
+ wxwidgets? ( dev-python/wxpython:2.8[${PY2_USEDEP}] )"
+
+# internal copy of pycxx highly patched
+# dev-python/pycxx
+
+DEPEND="${COMMON_DEPEND}
+ virtual/pkgconfig
+ doc? (
+ app-text/dvipng
+ dev-python/imaging[${PY2_USEDEP}]
+ dev-python/ipython
+ dev-python/xlwt[${PY2_USEDEP}]
+ dev-python/sphinx[${PYTHON_USEDEP}]
+ dev-texlive/texlive-latexextra
+ dev-texlive/texlive-fontsrecommended
+ dev-texlive/texlive-latexrecommended
+ media-gfx/graphviz[cairo]
+ )
+ test? ( dev-python/nose[${PYTHON_USEDEP}] )"
+
+RDEPEND="${COMMON_DEPEND}
+ virtual/pyparsing[${PYTHON_USEDEP}]
+ cairo? ( dev-python/pycairo[${PYTHON_USEDEP}] )
+ excel? ( dev-python/xlwt[${PY2_USEDEP}] )
+ fltk? ( dev-python/pyfltk[${PY2_USEDEP}] )
+ gtk3? ( dev-python/pygobject:3[${PYTHON_USEDEP}]
+ x11-libs/gtk+:3[introspection] )
+ latex? (
+ virtual/latex-base
+ app-text/ghostscript-gpl
+ app-text/dvipng
+ app-text/poppler[utils]
+ dev-texlive/texlive-fontsrecommended
+ )
+ qt4? ( || ( dev-python/PyQt4[X,${PYTHON_USEDEP}] dev-python/pyside[X,${PYTHON_USEDEP}] ) )"
+
+PY2_FLAGS="|| ( $(python_gen_useflags python2*) )"
+REQUIRED_USE="doc? ( ${PY2_FLAGS} )
+ excel? ( ${PY2_FLAGS} )
+ fltk? ( ${PY2_FLAGS} )
+ gtk? ( ${PY2_FLAGS} )
+ wxwidgets? ( ${PY2_FLAGS} )"
+
+RESTRICT="mirror"
+
+# A few C++ source files are written to srcdir.
+# Other than that, the ebuild shall be fit for out-of-source build.
+DISTUTILS_IN_SOURCE_BUILD=1
+
+use_setup() {
+ local uword="${2:-${1}}"
+ if use ${1}; then
+ echo "${uword} = True"
+ echo "${uword}agg = True"
+ else
+ echo "${uword} = False"
+ echo "${uword}agg = False"
+ fi
+}
+
+python_prepare_all() {
+ # remove internal copies of pyparsing
+ rm lib/matplotlib/pyparsing{_py2,_py3}.py || die
+
+ sed -i -e 's/matplotlib.pyparsing_py[23]/pyparsing/g' \
+ lib/matplotlib/{mathtext,fontconfig_pattern}.py \
+ || die "sed pyparsing failed"
+
+ local PATCHES=(
+ # avoid checks needing a X display
+ "${FILESDIR}"/${PN}-1.2.0-setup.patch
+ )
+
+ distutils-r1_python_prepare_all
+}
+
+python_configure_all() {
+ append-flags -fno-strict-aliasing
+}
+
+python_configure() {
+ mkdir -p "${BUILD_DIR}" || die
+
+ # create setup.cfg (see setup.cfg.template for any changes).
+
+ # common switches.
+ cat > "${BUILD_DIR}"/setup.cfg <<-EOF || die
+ [provide_packages]
+ pytz = False
+ dateutil = False
+ [gui_support]
+ $(use_setup cairo)
+ $(use_setup qt4)
+ $(use_setup tk)
+ EOF
+
+ if [[ ${EPYTHON} == python3* ]]; then
+ cat >> "${BUILD_DIR}"/setup.cfg <<-EOF || die
+ six = True
+ fltk = False
+ fltkagg = False
+ gtk = False
+ gtkagg = False
+ wx = False
+ wxagg = False
+ EOF
+ else
+ cat >> "${BUILD_DIR}"/setup.cfg <<-EOF || die
+ six = False
+ $(use_setup fltk)
+ $(use_setup gtk)
+ $(use_setup wxwidgets wx)
+ EOF
+ fi
+}
+
+wrap_setup() {
+ local MPLSETUPCFG=${BUILD_DIR}/setup.cfg
+ export MPLSETUPCFG
+
+ # Note: remove build... if switching to out-of-source build
+ "${@}" build --build-lib="${BUILD_DIR}"/build/lib
+}
+
+python_compile() {
+ wrap_setup distutils-r1_python_compile
+}
+
+python_compile_all() {
+ if use doc; then
+ cd doc || die
+
+ # necessary for in-source build
+ local -x PYTHONPATH="${BUILD_DIR}"/build/lib:${PYTHONPATH}
+
+ unset DISPLAY # bug #278524
+ VARTEXFONTS="${T}"/fonts \
+ "${PYTHON}" ./make.py --small html || die
+ fi
+}
+
+python_test() {
+ wrap_setup distutils_install_for_testing
+
+ cd "${TMPDIR}" || die
+ "${PYTHON}" -c "
+import sys, matplotlib as m
+sys.exit(0 if m.test(verbosity=2) else 1)
+" || die "Tests fail with ${EPYTHON}"
+}
+
+python_install() {
+ wrap_setup distutils-r1_python_install
+}
+
+python_install_all() {
+ use doc && local HTML_DOCS=( doc/build/html/. )
+
+ distutils-r1_python_install_all
+
+ if use examples; then
+ dodoc -r examples
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+}