summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: fdb20ecdc00014542516a4b15f5ee7692b9ed55c (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
# Maintainer: Thomas WeiƟschuh <thomas t-8ch de>

pkgbase=python-ggplot
pkgname=(python-ggplot python2-ggplot)
_libname=${pkgbase/python-/}
pkgver=0.11.5
pkgrel=1
pkgdesc='ggplot for python'
arch=('any')
url='https://github.com/yhat/ggplot/'
license=('BSD')
makedepends=('python-setuptools' 'python2-setuptools')
source=(https://pypi.python.org/packages/3f/a1/090033eb6be0f62350a2fa209e4813a194431997de6f5486366f5b55b992/ggplot-${pkgver}.tar.gz)


prepare() {
    cd "$srcdir/ggplot-$pkgver"
    python setup.py build

    cd "$srcdir"
    cp -a ggplot-$pkgver{,-py2}
    find ggplot-$pkgver-py2 -name \*.py -exec sed -r 's|^#!(.*)python$|#!\1python2|' -i {} +
}

build() {
    cd "$srcdir"/ggplot-$pkgver
    python setup.py build

    cd "$srcdir"/ggplot-$pkgver-py2
    python2 setup.py build
}

package_python-ggplot() {
    depends=('python-matplotlib' 'python-statsmodels' 'python-brewer2mpl')
    cd "$srcdir/ggplot-$pkgver"
    python setup.py install --root="$pkgdir" --optimize=1
}

package_python2-ggplot() {
    depends=('python-matplotlib' 'python-statsmodels' 'python-brewer2mpl')
    cd "$srcdir/ggplot-$pkgver-py2"
    python2 setup.py install --root="$pkgdir" --optimize=1
}

sha256sums=('48bbc9ea5987f815ad25856d76573506dbfe153ff696f026ce324582af56469f')