# Contributor: Carlo Landmeter # Maintainer: Fabian Affolter pkgname=py-pylast pkgver=2.1.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="b33b9f644bf3fccb46a17cfe53020a2842dd9bcdf6b859353adf306a987f4d10a76554da95e832ab813f00deb2947684b276674798d67aab2cdb0cb9a141853e pylast-2.1.0.tar.gz"