# Automatically generated by apkbuild-pypi, template 4
# Maintainer: Celeste <cielesti@protonmail.com>
maintainer="Celeste <cielesti@protonmail.com>"
pkgname=py3-async-lru
#_pkgreal is used by apkbuild-pypi to find modules at PyPI
_pkgreal=async-lru
pkgver=2.0.4
pkgrel=1
pkgdesc="Simple LRU cache for asyncio"
url="https://pypi.org/project/async-lru/"
arch="noarch"
license="MIT"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-pytest-asyncio py3-pytest-cov py3-pytest-timeout"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/a/async-lru/async-lru-$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-$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 pytest
}

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

sha512sums="
f659fe8fdcec310f0070ffee5eabbc92c50b9d987d0b221e119a6cc67710f4c704ba3447518170e408f32b598abcf8e94fcaec9c9111120947126f26d5f021c6  async-lru-2.0.4.tar.gz
"
