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

pkgname=python-pytest-sugar
pkgver=1.0.0
pkgrel=4
pkgdesc='A plugin for py.test that changes the default look and feel of py.test'
arch=('any')
license=('BSD-3-Clause')
url='https://github.com/Teemu/pytest-sugar'
depends=('python' 'python-pytest' 'python-termcolor' 'python-packaging')
makedepends=('python-setuptools' 'python-build' 'python-installer' 'python-wheel')
source=("$pkgname-$pkgver.tar.gz::https://github.com/Teemu/pytest-sugar/archive/refs/tags/v$pkgver.tar.gz")
sha512sums=('5c19411e103d86675788f64f10406f5261c63003874e359d455c0c980605320dc8a26d8343d512f1cf8d895d801d985e2c8a4b7ed509637750a6cdb076355471')

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

check() {
  cd pytest-sugar-$pkgver
  pytest -v
}

package() {
  cd pytest-sugar-$pkgver
  python -m installer --destdir="$pkgdir" dist/*.whl
  install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
}

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