# Contributor: Celeste <cielesti@protonmail.com>
# Maintainer: Celeste <cielesti@protonmail.com>
pkgname=py3-aiosqlite
pkgver=0.20.0
pkgrel=1
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="
2bda2abb309e9fbde2ed991ff368e9815ea361cf0b46ce9177132354ac52133a3314c1156071199248c8f4a81cc108728b01125901373077ee1bc32f393cbd40  py3-aiosqlite-0.20.0.tar.gz
"
