# Maintainer: Filipe Laíns (FFY00) <lains@archlinux.org>
# Maintainer: Maxime Gauduin <alucryd@archlinux.org>

pkgname=uvicorn
pkgver=0.29.0
pkgrel=2
pkgdesc='The lightning-fast ASGI server'
arch=(any)
url=https://github.com/encode/uvicorn
license=(BSD)
depends=(
  python
  python-asgiref
  python-click
  python-h11
  python-httptools
  python-uvloop
  python-websockets
)
makedepends=(
  git
  python-build
  python-hatchling
  python-installer
)
_tag=fe85206c5c79be52910ff1b7049591adbab72e4d
source=(git+https://github.com/encode/uvicorn#tag=${_tag})
b2sums=(SKIP)

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

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

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

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