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

pkgname=python-testrepository
pkgver=0.0.21
pkgrel=1
pkgdesc="A repository of test results."
arch=('any')
license=('Apache' 'BSD')
url="https://launchpad.net/testrepository"
depends=('python-testtools' 'python-fixtures' 'python-subunit')
makedepends=('python-hatch' 'python-hatch-vcs' 'python-build' 'python-installer' 'python-wheel')
checkdepends=('python-testresources' 'python-pytz' 'python-testscenarios')
source=("https://pypi.python.org/packages/source/t/testrepository/testrepository-$pkgver.tar.gz")
sha512sums=('c03108434a4ab3145106a6d05f4ff42d6d2b8f103de8dee7e0e829f5a450e838c8f9c7033e97afbc764badcbe2050aa41f2da30c439edb390ce38c73c0244065')

build() {
  cd testrepository-$pkgver
  python -m build --wheel --no-isolation
}

check() {
  cd testrepository-$pkgver
  python ./testr init
  python ./testr run --parallel
}

package() {
  cd testrepository-$pkgver
  python -m installer --destdir="$pkgdir" dist/*.whl
}
