# Contributor: 6543 <6543@obermui.de>
# Maintainer: 6543 <6543@obermui.de>
pkgname=py3-immutabledict
pkgver=4.2.0
pkgrel=1
pkgdesc="Fork of frozendict, an immutable wrapper around dictionaries for Python3"
url="https://github.com/corenting/immutabledict"
arch="noarch"
license="MIT"
depends="python3"
makedepends="py3-poetry-core py3-gpep517 py3-installer"
checkdepends="python3 py3-pytest"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/corenting/immutabledict/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir"/immutabledict-$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="
d4177281134f73191f019a8cfe61752f6398b1bb36d9fad4c112c598be7664960eae8fdc4cd4bbce912dd93f599cd80761df03b49cf4fc57ac2ec3d3d2301a17  py3-immutabledict-4.2.0.tar.gz
"
