# Contributor: Carlo Landmeter # Maintainer: Fabian Affolter pkgname=py-pylast pkgver=2.4.0 pkgrel=0 pkgdesc="A Python interface to the last.fm API" url="https://github.com/pylast/pylast" arch="noarch" license="Apache" # Requires packages which are not available for test options="!check" makedepends="python2-dev py-setuptools python3-dev" subpackages="py3-${pkgname#py-}:_py3 py2-${pkgname#py-}:_py2" source="https://files.pythonhosted.org/packages/source/p/pylast/pylast-$pkgver.tar.gz" builddir="$srcdir"/pylast-$pkgver build() { cd "$builddir" python2 setup.py build python3 setup.py build } check() { cd "$builddir" python2 setup.py test python3 setup.py test } package() { mkdir -p "$pkgdir" } _py() { local python="$1" pkgdesc="$pkgdesc (for $python)" depends="$python" install_if="$pkgname=$pkgver-r$pkgrel $python" cd "$builddir" $python setup.py install --prefix=/usr --root="$subpkgdir" } _py2() { replaces="$pkgname" _py python2 } _py3() { _py python3 } sha512sums="2807aaebd9eb901b1eb803416fa319785d95a12fe7ebc72ff211f48ee6e06d4aa25438a24279e73b31fa73a599d666fbfe784952b2da387e6d777c2726effc6f pylast-2.4.0.tar.gz"