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

pkgname=python-testresources
pkgver=2.0.1
pkgrel=13
pkgdesc="Testresources, a pyunit extension for managing expensive test resources"
arch=('any')
license=('Apache' 'BSD')
url="https://launchpad.net/testresources"
depends=('python')
makedepends=('python-pbr' 'python-testtools' 'git')
checkdepends=('python-fixtures')
source=("git+https://github.com/testing-cabal/testresources.git#commit=6bc6a9c4cbea1c993d3dc32d517854de779903ce")
sha512sums=('612ab50f6f6144618b16f5ca535a9bee1ece0bda6da006a1f0274c09aa9542e920dfaf3e27bc07f986b0e8cc2b00a553bfbc8a308bd85d1e146c744f8598dd07')

build() {
  cd testresources
  python setup.py build
}

check() {
  cd testresources
  python -m testtools.run discover
}

package() {
  cd testresources
  python setup.py install --root="$pkgdir" --optimize=1
  install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
}
