# Maintainer: Maxime Gauduin <alucryd@archlinux.org>

pkgname=python-quart
pkgver=0.19.4
pkgrel=1
pkgdesc='A Python ASGI web microframework with the same API as Flask'
url=https://github.com/pallets/quart
arch=(any)
license=(MIT)
depends=(
  hypercorn
  python-aiofiles
  python-blinker
  python-click
  python-importlib-metadata
  python-itsdangerous
  python-jinja
  python-markupsafe
  python-werkzeug
)
makedepends=(
  git
  python-build
  python-installer
  python-poetry-core
  python-wheel
)
_tag=7ee33a4d10d94a7199a1945f3d71c80a0b23617d
source=(git+https://github.com/pallets/quart.git#tag=${_tag})
sha256sums=(SKIP)

prepare() {
  sed 's/name = "Quart"/name = "quart"/' -i quart/pyproject.toml
}

pkgver() {
  cd quart
  git describe --tags
}

build() {
  cd quart
  python -m build --wheel --no-isolation
}

package() {
  python -m installer --destdir="${pkgdir}" quart/dist/*.whl
  install -Dm 644 quart/LICENSE -t "${pkgdir}"/usr/share/licenses/python-quart/
}

# vim: ts=2 sw=2 et:
