# Maintainer: Andreas Grapentin <oaken-source@parabola.nu>

_pkgname=isbnlib
pkgname=(python{,2}-$_pkgname)
pkgver=3.9.9
pkgrel=1
pkgdesc='Extract, clean, transform, hyphenate and metadata for ISBNs'
arch=(any)
url="https://pypi.python.org/pypi/$_pyname"
license=('LGPL3')

_depends=()
makedepends=(python{,2}-setuptools)
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/${_pkgname}/${_pkgname}-${pkgver}.tar.gz")
sha256sums=('ba2d5a86a70db0f1951df479205e9144d9e55b8af4995b3857a79a30c6ff16ab')

_package() {
  depends=("$1" "${_depends[@]/#/$1-}")
  cd "$srcdir"/$_pkgname-$pkgver
  $1 setup.py install --root="$pkgdir"
}

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