# $Id: PKGBUILD 139431 2015-09-07 07:34:24Z alucryd $
# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: Steven Allen <steven@stebalien.com>
# Contributor: Limao Luo <luolimao+AUR@gmail.com>
# Contributor: Wieland Hoffmann <the_mineo@web.de>
# Contributor: Amr Hassan <amr.hassan@gmail.com>

pkgbase=python-pylast
pkgname=('python-pylast' 'python2-pylast')
pkgver=1.4.0
pkgrel=1
pkgdesc='A Python interface to Last.fm and Libre.fm'
arch=('any')
url='https://github.com/pylast/pylast'
license=('Apache')
makedepends=('python-setuptools' 'python2-setuptools')
source=("http://pypi.python.org/packages/source/p/pylast/pylast-${pkgver}.tar.gz")
sha256sums=('b7d0437f675cde4b1aeb24fac14628492ffb5f7a63baf95100edff06085d11cb')

prepare() {
  cp -r pylast-${pkgver} python2-pylast-${pkgver}
}

build() {
  cd pylast-${pkgver}

  python setup.py build

  cd ../python2-pylast-${pkgver}

  python2 setup.py build
}

package_python-pylast() {
  depends=('python-six')

  cd pylast-${pkgver}

  python setup.py install --root="${pkgdir}" --optimize='1'
}

package_python2-pylast() {
  depends=('python2-six')

  cd python2-pylast-${pkgver}

  python2 setup.py install --root="${pkgdir}" --optimize='1'
}

# vim: ts=2 sw=2 et:
