# Maintainer: Celeste <cielesti@protonmail.com>
maintainer="Celeste <cielesti@protonmail.com>"
pkgname=py3-aiosqlite
pkgver=0.21.0
pkgrel=0
pkgdesc="AsyncIO bridge to the standard Sqlite3 module"
url="https://aiosqlite.omnilib.dev/"
arch="noarch"
license="MIT"
makedepends="
	py3-flit-core
	py3-gpep517
	"
subpackages="$pkgname-pyc"
source="https://github.com/omnilib/aiosqlite/archive/v$pkgver/py3-aiosqlite-$pkgver.tar.gz"
builddir="$srcdir/aiosqlite-$pkgver"

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

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m aiosqlite.tests
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
	rm -r "$pkgdir"/usr/lib/python*/site-packages/aiosqlite/tests
}

sha512sums="
83e348bf507863d4aaf7c8f5446e9d3b84447bcb04553cdcee7c9504693f4a2bf296b3863cd9c3cedbfdf421daae83acb65596fa0232a9cf654647ccea6f3283  py3-aiosqlite-0.21.0.tar.gz
"
