# Maintainer (arch): Francois Boulogne <fboulogne at april dot org>

pkgname=python2-liblarch
pkgver=2.1.0
pkgrel=1
pkgdesc="Python library to easily handle data structure"
arch=('any')
url="https://live.gnome.org/liblarch"
license=('LGPL3')
depends=('python2')
optdepends=()
makedepends=('python2' 'python2-distribute')
checkdepends=('python2-nose' 'python2-gobject2' 'pygtk')
provides=('python2-liblarch_gtk')
conflicts=('python2-liblarch_gtk')
source=("https://github.com/liblarch/liblarch/archive/v${pkgver}.tar.gz")
md5sums=('a49cd17bd00bdd42cbcaf20c06789508')

check() {
  cd "$srcdir/liblarch-${pkgver}"
  python2 run-tests
}

package() {
  cd "$srcdir/liblarch-${pkgver}"
  python2 setup.py install --root="${pkgdir}"
  find "$pkgdir"/usr/lib/python2.7/site-packages/liblarch -name '*.py' | \
  xargs sed -i "s|#!/usr/bin/env python|#!/usr/bin/env python2|"
}


# vim:set ts=2 sw=2 et:
