# Contributor: Kevin Daudt # Maintainer: Kevin Daudt pkgname=py-prawcore pkgver=1.0.1 pkgrel=0 pkgdesc="a low-level communication layer for PRAW 4+" url="https://github.com/praw-dev/prawcore" arch="noarch" license="BSD-2-Clause" depends="py-setuptools" makedepends="python2-dev python3-dev" subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3" source="$pkgname-$pkgver.tar.gz::https://github.com/praw-dev/prawcore/archive/v$pkgver.tar.gz" builddir="$srcdir/prawcore-$pkgver" build() { cd "$builddir" python2 setup.py build python3 setup.py build } check() { cd "$builddir" python2 setup.py test python3 setup.py test } 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="6efe8faa685aa92a04309c4c24963a2a540335ad0bed31b990d840732ddf726789688171f4ead4daf831e89da5c95c17861a079dfc9ae3de254d2690bcff1c8b py-prawcore-1.0.1.tar.gz"