# Automatically generated by apkbuild-pypi, template 4
# Contributor: fossdd <fossdd@pwned.life>
# Maintainer: fossdd <fossdd@pwned.life>
pkgname=py3-eth-hash
pkgver=0.7.0
pkgrel=0
#_pkgreal is used by apkbuild-pypi to find modules at PyPI
_pkgreal=eth-hash
pkgdesc="eth-hash: The Ethereum hashing function, keccak256, sometimes (erroneously) called sha3"
url="https://pypi.org/project/eth-hash/"
arch="noarch"
license="MIT"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/e/eth-hash/eth-hash-$pkgver.tar.gz"
builddir="$srcdir/$_pkgreal-$pkgver"
options="!check" # a lot of failures

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 tests
}

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

sha512sums="
7922818080e80b4b793d7cd5be0f8998edcad73b40fb2920dd759e0fdfc2384322b513573071ba75c5b723651cee17001abdd6fdda1c902bd94d3ea964e04ab5  eth-hash-0.7.0.tar.gz
"
