blob: 9a3ebeb83ec26ff250850caab611d05e7177bac8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
# $Id: PKGBUILD 104353 2014-01-19 04:17:18Z bgyorgy $
# 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.1
pkgrel=2
pkgdesc="A python plotting library, making publication quality plots"
arch=('i686' 'x86_64' 'mips64el')
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"
"ffmpeg-2.0.patch")
sha512sums=('04877aa15b6d52a6f813e8377098d13c432f66ae2522c544575440180944c9b73a2164ae63edd3a0eff807883bf7b39cd55f28454ccee8c76146567ff4a6fd40'
'f76cde48aee9819f080bc34717c9cb6270f6dfac0490e7b19673ee665392be1837621aa858435f48595fa7d095e8efaee6737c87f9d42419499f5b8b8b001129')
prepare() {
cp -a matplotlib-${pkgver} matplotlib-${pkgver}-py3
cd matplotlib-${pkgver}
patch -Np1 -i ../ffmpeg-2.0.patch
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
patch -Np1 -i ../ffmpeg-2.0.patch
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
}
|