summaryrefslogtreecommitdiff
path: root/community/python-matplotlib/PKGBUILD
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-11-10 01:23:31 -0800
committerroot <root@rshg054.dnsready.net>2012-11-10 01:23:31 -0800
commit6eea0bd1e92ed5aa53cb5f59102529c88e9e1786 (patch)
treeb069468f4084f5af5ad3ba2ecab7e6b4deb90267 /community/python-matplotlib/PKGBUILD
parent3f7cb62ef558ea147661abe007a4293c0069fc62 (diff)
Sat Nov 10 01:23:30 PST 2012
Diffstat (limited to 'community/python-matplotlib/PKGBUILD')
-rw-r--r--community/python-matplotlib/PKGBUILD74
1 files changed, 74 insertions, 0 deletions
diff --git a/community/python-matplotlib/PKGBUILD b/community/python-matplotlib/PKGBUILD
new file mode 100644
index 000000000..8f6b37ea6
--- /dev/null
+++ b/community/python-matplotlib/PKGBUILD
@@ -0,0 +1,74 @@
+# $Id: PKGBUILD 79647 2012-11-10 00:59:34Z stephane $
+# 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.2.0
+pkgrel=2
+pkgdesc="A python plotting library, making publication quality plots"
+arch=('i686' 'x86_64')
+url="http://matplotlib.sourceforge.net/"
+license=('custom')
+backup=(usr/lib/python2.7/site-packages/matplotlib/mpl-data/matplotlibrc)
+makedepends=('python2-pytz' 'python2-numpy' 'python2-pyqt'
+ 'python-pytz' 'python-numpy' 'pyqt')
+source=("https://github.com/downloads/matplotlib/matplotlib/matplotlib-${pkgver}.tar.gz"
+ setup.cfg)
+sha1sums=('1d0c319b2bc545f1a7002f56768e5730fe573518'
+ '370a08120bcb3046f590c527b3d29d18ae874818')
+
+build() {
+ cd "${srcdir}"/matplotlib-${pkgver}
+
+ # use system python-six
+ rm lib/six.py
+
+ cp ../setup.cfg .
+
+ # For numpy 1.7
+ sed -i '/include/s/numpy\/arrayobject.h/numpy\/oldnumeric.h/g' \
+ src/*.{c,cpp,h} lib/matplotlib/delaunay/*.{cpp,h} lib/matplotlib/tri/*.h
+
+ cd ..
+ cp -a matplotlib-${pkgver} matplotlib-${pkgver}-py3
+
+ # Build python2
+ 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
+
+ python2 setup.py build
+
+ # Build python3
+ 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
+
+ python3 setup.py build
+}
+
+package_python2-matplotlib() {
+ depends=('python2-pytz' 'python2-numpy' 'python2-pyqt' 'python2-dateutil')
+
+ cd "${srcdir}"/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' 'pyqt' 'python-dateutil')
+ cd "${srcdir}"/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
+}