# Maintainer: Hu Butui <hot123tea123@gmail.com>
# Contributor: morguldir <morguldir@protonmail.com>

_pkgname=yappi
pkgname=python-yappi
pkgver=1.7.7
pkgrel=1
pkgdesc='Yet Another Python Profiler, but this time thread & coroutine & greenlet aware'
url='https://github.com/sumerc/yappi'
license=('MIT')
arch=('x86_64')
depends=(
  python
)
makedepends=(
  python-build
  python-installer
  python-setuptools
  python-wheel
)
source=("${_pkgname}-${pkgver}.tar.gz::https://github.com/sumerc/yappi/archive/refs/tags/v${pkgver}.tar.gz")
sha256sums=('84df70c7de26861ed624e7d321ec2d5ac26dae04d4f75ecc3e76b5c85248336e')

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

package() {
  cd "${_pkgname}-${pkgver}"
  python -m installer --destdir="${pkgdir}" dist/*.whl
  install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
# vim:set ts=2 sw=2 et:
