# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Qirui Wang <wqr.prg@gmail.com>
# Contributor: Carl George < arch at cgtx dot us >

pkgname=python-sanic-routing
pkgver=23.12.0
pkgrel=6
pkgdesc='Core routing component for Sanic'
arch=("any")
url='https://sanicframework.org/'
license=(MIT)
depends=(python)
makedepends=(git python-build python-installer python-setuptools python-wheel)
checkdepends=(python-pytest python-sanic python-pytest-asyncio)
source=("git+https://github.com/sanic-org/sanic-routing.git#tag=v$pkgver")
sha256sums=('8b2282b6418eae312c9f1fa8cc3aca05c5f7eb9c112889a7f54df19d9249475c')

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

check() {
    cd sanic-routing
    python -m pytest
}

package() {
    cd sanic-routing
    python -m installer --destdir="$pkgdir" dist/*.whl
    install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
}
