# 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=5
pkgdesc='Core routing component for Sanic'
arch=("any")
url='https://sanicframework.org/'
license=(MIT)
depends=(python)
makedepends=(python-setuptools)
checkdepends=(python-pytest python-sanic python-pytest-asyncio)
source=("https://github.com/sanic-org/sanic-routing/archive/v$pkgver/$pkgname-$pkgver.tar.gz")
sha256sums=('10392135e26c794f73cb5641bf5ac997dccbadc1074618f2b940fbef7a8f6980')

build() {
    cd sanic-routing-$pkgver
    python setup.py build
}

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

package() {
    cd sanic-routing-$pkgver
    python setup.py install --skip-build --root="$pkgdir" --optimize=1
    install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
}
