# repolint: reason=asdeps

_pkgname=pyutil
pkgname=(python{,2}-$_pkgname)
pkgver=3.1.0
pkgrel=1
pkgdesc="a collection of utilities for Python programmers"
arch=(any)
url="https://pypi.python.org/pypi/pyutil"
license=(GPL2)

makedepends=(python{,2}-setuptools)
checkdepends=(python{,2}-twisted python{,2}-mock)
source=("https://pypi.python.org/packages/source/p/pyutil/pyutil-${pkgver}.tar.gz")
sha256sums=('8e254aa0a3b59e90515f7bca7ebc467b20a8d3fd2e26b63d196655c075da8d38')

_package() {
  depends=($1)
  optdepends=($1-simplejson $1-zbase32)
  cd "$srcdir"/$_pkgname-$pkgver
  $1 setup.py install --root="$pkgdir"
  rm -r "$pkgdir"/usr/pyutil
}

for pkg in "${pkgname[@]}"; do
  eval "package_$pkg () { _package ${pkg%%-*}; }"
done
