# Maintainer: Carl Smedstad <carsme@archlinux.org>

pkgname=python-blockbuster
pkgver=1.5.25
pkgrel=1
pkgdesc='Utility to detect blocking calls in the async event loop'
arch=(any)
url=https://github.com/cbornet/blockbuster
license=(Apache-2.0)
depends=(
  python
  python-forbiddenfruit
)
makedepends=(
  git
  python-build
  python-hatchling
  python-installer
  python-wheel
)
checkdepends=(
  python-pytest
  python-pytest-asyncio
  python-requests
)
source=("git+$url.git#tag=v$pkgver")
sha256sums=('112a5b57f70f62447fe9b8463018dcde80d23beff4e16f94f1e8bc64273ea2ff')

build() {
  cd ${pkgname#python-}
  python -m build --wheel --no-isolation
}

check() {
  cd ${pkgname#python-}
  pytest
}

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