# Contributor: Marten Ringwelski <git+alpine@maringuu.de>
# Contributor: Steven Guikal <apk-void@fluix.one>
# Maintainer: Steven Guikal <apk-void@fluix.one>
pkgname=py3-starlette
pkgver=0.46.2
pkgrel=0
pkgdesc="Lightweight ASGI framework/toolkit, which is ideal for building async web services in Python"
url="https://github.com/encode/starlette"
arch="noarch"
license="MIT"
depends="
	py3-anyio
	"
makedepends="
	py3-gpep517
	py3-hatchling
	py3-installer
	"
checkdepends="
	py3-httpx
	py3-itsdangerous
	py3-jinja2
	py3-pytest-forked
	py3-pytest-xdist
	py3-python-multipart
	py3-trio
	py3-typing-extensions
	py3-yaml
	"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/encode/starlette/archive/refs/tags/$pkgver.tar.gz"
builddir="$srcdir/starlette-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m pytest -n auto --forked
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/starlette*.whl
}

sha512sums="
51805e61c33b20d2c034d513c4795876a70f60f19798a91fad3594d77bb0fd638c6de73d56032b1806df9e9bff62dcb13aa23d0b7e5c83d0a0ef5166f0b141da  py3-starlette-0.46.2.tar.gz
"
