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

pkgname=python-testresources
pkgver=2.0.2
pkgrel=1
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#tag=$pkgver")
sha512sums=('238e0c311f94aaee81bb4c7d9ee7130216779d6f6d0c7848ba4df5e6b6182ec6d5f0780f23e76e14f70c75e852e1b28c354628b6da0518eb311bc46847a6bec0')

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 -t "$pkgdir"/usr/share/licenses/$pkgname/
}
