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

_pkgname=pylibgen
# python3 only
pkgname=(python-$_pkgname)
pkgver=2.0.2
pkgrel=1
pkgdesc="Python interface to Library Genesis."
arch=(any)
url="https://pypi.python.org/pypi/$_pkgname"
license=('MIT')

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

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

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