# Contributor: Kevin Daudt # Maintainer: Kevin Daudt pkgname=py-backcall pkgver=0.1.0 pkgrel=0 pkgdesc="Backwards compatible callback APIs" url="https://github.com/takluyver/backcall" arch="noarch" license="BSD-3-Clause" makedepends="python2-dev python3-dev" checkdepends="pytest" subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3" source="https://files.pythonhosted.org/packages/source/b/backcall/backcall-$pkgver.tar.gz" builddir="$srcdir/${pkgname#py-}-$pkgver" build() { cd "$builddir" python2 setup.py build python3 setup.py build } check() { cd "$builddir" py.test-2 py.test-3 } package() { cd "$builddir" mkdir -p "$pkgdir" } _py2() { depends="${depends//py-/py2-}" _py python2 } _py3() { depends="${depends//py-/py3-}" _py python3 } _py() { local python="$1" pkgdesc="$pkgdesc (for $python)" depends="$depends $python" install_if="$pkgname=$pkgver-r$pkgrel $python" cd "$builddir" $python setup.py install --prefix=/usr --root="$subpkgdir" } sha512sums="359c483fbc8998fc2420daee2a6af7566c47fb03f64e465aa226589a2f98a4b219ab5e5b90e5f677087827a1ac658c02ec3062e9ffe9ac1ebfd9db3bb40339cd backcall-0.1.0.tar.gz"