# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-extras
pkgver=1.0.0
pkgrel=13
pkgdesc="Useful extra bits for Python - things that should be in the standard library"
arch=('any')
license=('MIT')
url="https://github.com/testing-cabal/extras"
depends=('python')
makedepends=('python-setuptools')
checkdepends=('python-testtools')
source=("https://github.com/testing-cabal/extras/archive/$pkgver/$pkgname-$pkgver.tar.gz")
sha512sums=('db264cf183dd0f63a411d03def51bb6ec8c5d47fe1e3e75cab4d65f2793b9458023a2387574968b095bf39cf7746428f7e7f190100dbdf2d99695f4c69875475')

build() {
  cd extras-$pkgver
  python setup.py build
}

check() {
  cd extras-$pkgver
  python -m testtools.run extras.tests.test_suite
}

package() {
  cd extras-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1
  install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
