From 415856bdd4f48ab4f2732996f0bae58595092bbe Mon Sep 17 00:00:00 2001 From: Parabola Date: Tue, 5 Apr 2011 14:26:38 +0000 Subject: Tue Apr 5 14:26:38 UTC 2011 --- community/python2-matplotlib/PKGBUILD | 52 +++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 community/python2-matplotlib/PKGBUILD (limited to 'community/python2-matplotlib/PKGBUILD') diff --git a/community/python2-matplotlib/PKGBUILD b/community/python2-matplotlib/PKGBUILD new file mode 100644 index 000000000..7f19554c5 --- /dev/null +++ b/community/python2-matplotlib/PKGBUILD @@ -0,0 +1,52 @@ +# $Id: PKGBUILD 40554 2011-02-25 11:55:09Z stephane $ +# Maintainer: Stéphane Gaudreault +# Contributor: Stefan Husmann +# Contributor: Angel 'angvp' Velasquez +# Contributor: Douglas Soares de Andrade + +pkgname=python2-matplotlib +pkgver=1.0.1 +pkgrel=2 +pkgdesc="A python plotting library, making publication quality plots" +arch=('i686' 'x86_64') +url="http://matplotlib.sourceforge.net/" +backup=(usr/lib/python2.7/site-packages/matplotlib/mpl-data/matplotlibrc) +depends=('python-dateutil' 'python2-pytz' 'python2-numpy' 'python2-pyparsing' 'python2-qt') +optdepends=('pygtk: for use with the GTK or GTKAgg backend' + 'tk: used by the TkAgg backend' + 'wxpython: for use with the WXAgg backend') +makedepends=('pygtk' 'tk' 'wxpython') +provides=('matplotlib' "python-matplotlib=${pkgver}") +replaces=('python-matplotlib') +conflicts=('python-matplotlib') +source=("http://downloads.sourceforge.net/matplotlib/matplotlib-${pkgver}.tar.gz" + setup.cfg) +sha1sums=('c7a832f28a66817626e7a8af21e14ea0e15f4008' + 'bcb5a83db9d95c96a57ca518fa6bd1897b23558f') +license=('custom') + +build() { + cd "${srcdir}/matplotlib-${pkgver}" + + cp ../setup.cfg . + + # remove internal copy of pyparsing + rm lib/matplotlib/pyparsing.py + sed -i "s/matplotlib.pyparsing/pyparsing/g" lib/matplotlib/{mathtext,fontconfig_pattern}.py + + # python2 fix + for file in $(find . -name '*.py' -print); do + sed -i -e "s|^#!.*/usr/bin/python|#!/usr/bin/python2|" \ + -e "s|^#!.*/usr/bin/env *python|#!/usr/bin/env python2|" ${file} + done + + python2 setup.py build +} + +package() { + cd "${srcdir}/matplotlib-${pkgver}" + python2 setup.py install -O1 --skip-build --root "${pkgdir}" --prefix=/usr + + install -dm755 "${pkgdir}/usr/share/licenses/${pkgname}" + mv license "${pkgdir}/usr/share/licenses/${pkgname}" +} -- cgit v1.2.3-54-g00ecf