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

pkgname=python-pytest-repeat
pkgver=0.9.1
_commit=e987effed02b37d30f6cbc1e8c7f51a4b3b9e62f
pkgrel=6
pkgdesc='pytest plugin for repeating test execution'
arch=('any')
license=('MPL')
url='https://github.com/pytest-dev/pytest-repeat'
depends=('python-pytest')
makedepends=('git' 'python-setuptools-scm')
source=("git+https://github.com/pytest-dev/pytest-repeat.git#commit=$_commit")
sha512sums=('SKIP')

build() {
  cd pytest-repeat
  python setup.py build
}

check() {
  # Hack entry points by installing it

  cd pytest-repeat
  local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
  python setup.py install --root="$PWD/tmp_install" --optimize=1
  PYTHONPATH="$PWD/tmp_install$site_packages:$PYTHONPATH" pytest
}

package() {
  cd pytest-repeat
  python setup.py install --root="$pkgdir" --optimize=1
}

# vim:set ts=2 sw=2 et:
