# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Maxime Gauduin <alucryd@archlinux.org>

pkgname=python-quart
pkgver=0.19.6
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
  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=2fc6d4fa6e3df017e8eef1411ec80b5a6dce25a5
source=(git+https://github.com/pallets/quart.git#tag=${_tag})
sha256sums=('7118e6bb103b8f8384b32822900307407be27d06d1645f23a31123d1f163f43a')

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:
