summaryrefslogtreecommitdiff
path: root/community/python-matplotlib
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2013-08-13 01:33:19 -0700
committerroot <root@rshg054.dnsready.net>2013-08-13 01:33:19 -0700
commit7a65a910b77ad191d69881098c47f9b0c852d92e (patch)
tree9564e611af1442f8952a8cbddb3b0ad25ed71aab /community/python-matplotlib
parent60da6abff6c9577a783d72865f11de7a585e912e (diff)
Tue Aug 13 01:31:08 PDT 2013
Diffstat (limited to 'community/python-matplotlib')
-rw-r--r--community/python-matplotlib/PKGBUILD68
1 files changed, 68 insertions, 0 deletions
diff --git a/community/python-matplotlib/PKGBUILD b/community/python-matplotlib/PKGBUILD
new file mode 100644
index 000000000..62f4e2f7a
--- /dev/null
+++ b/community/python-matplotlib/PKGBUILD
@@ -0,0 +1,68 @@
+# $Id: PKGBUILD 95128 2013-08-05 23:48:54Z eric $
+# Maintainer: Stéphane Gaudreault <stephane@archlinux.org>
+# Contributor: Stefan Husmann <stefan-husmann@t-online.de>
+# Contributor: Angel 'angvp' Velasquez <angvp[at]archlinux.com.ve>
+# Contributor: Douglas Soares de Andrade <dsa@aur.archlinux.org>
+
+pkgbase=python-matplotlib
+pkgname=('python2-matplotlib' 'python-matplotlib')
+pkgver=1.3.0
+pkgrel=1
+pkgdesc="A python plotting library, making publication quality plots"
+arch=('i686' 'x86_64')
+url='http://matplotlib.org'
+license=('custom')
+makedepends=('python2-pytz' 'python2-numpy' 'python2-pyqt4' 'python-pytz' 'python-numpy'
+ 'python-pyqt4' 'tk' 'python-cairo' 'python2-cairo' 'python-dateutil'
+ 'python2-dateutil' 'python-gobject' 'python2-gobject' 'python-pyparsing'
+ 'python2-pyparsing' 'pygtk' 'python-six' 'ghostscript' 'texlive-bin')
+optdepends=('pygtk: for use with the GTK or GTKAgg backend'
+ 'tk: used by the TkAgg backend'
+ 'ghostscript: usetex dependencies'
+ 'texlive-bin: usetex dependencies')
+source=("http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-${pkgver}/matplotlib-${pkgver}.tar.gz")
+sha1sums=('4bcf177bbe2a1a576fbc0896e69c2de2cf7429ae')
+
+prepare() {
+ cp -a matplotlib-${pkgver} matplotlib-${pkgver}-py3
+
+ cd matplotlib-${pkgver}
+ 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
+
+ cd ../matplotlib-${pkgver}-py3
+ for file in $(find . -name '*.py' -print); do
+ sed -i -e "s|^#!.*/usr/bin/python|#!/usr/bin/python3|" \
+ -e "s|^#!.*/usr/bin/env *python|#!/usr/bin/env python3|" ${file}
+ done
+}
+
+build() {
+ cd matplotlib-${pkgver}
+ python2 setup.py build
+
+ cd ../matplotlib-${pkgver}-py3
+ python3 setup.py build
+}
+
+package_python2-matplotlib() {
+ depends=('python2-pytz' 'python2-numpy' 'python2-cairo' 'python2-pyqt4' 'python2-dateutil' 'python2-pyparsing')
+
+ cd matplotlib-${pkgver}
+ python2 setup.py install -O1 --skip-build --root "${pkgdir}" --prefix=/usr
+
+ install -dm755 "${pkgdir}"/usr/share/licenses/python2-matplotlib
+ install -m 644 doc/users/license.rst "${pkgdir}"/usr/share/licenses/python2-matplotlib
+}
+
+package_python-matplotlib() {
+ depends=('python-pytz' 'python-numpy' 'python-cairo' 'python-pyqt4' 'python-dateutil' 'python-pyparsing')
+
+ cd matplotlib-${pkgver}-py3
+ python3 setup.py install -O1 --skip-build --root "${pkgdir}" --prefix=/usr
+
+ install -dm755 "${pkgdir}"/usr/share/licenses/python-matplotlib
+ install -m 644 doc/users/license.rst "${pkgdir}"/usr/share/licenses/python-matplotlib
+}