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

_pkgname=arxiv2bib
pkgname=(python{,2}-$_pkgname)
pkgver=1.0.8
pkgrel=3
pkgdesc="Get arXiv.org metadata in BibTeX format"
arch=(any)
url="https://pypi.python.org/pypi/$pkgname"
license=('BSD3')

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

_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
