# Contributor: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
# Maintainer: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
pkgname=py3-efficient-apriori
pkgver=2.0.3
pkgrel=2
pkgdesc="An efficient Python implementation of the Apriori algorithm"
url="https://github.com/tommyod/Efficient-Apriori"
arch="noarch"
license="MIT"
depends="python3"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-wheel
	"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="https://github.com/tommyod/Efficient-Apriori/archive/v$pkgver/efficient-apriori-$pkgver.tar.gz"
builddir="$srcdir/Efficient-Apriori-$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="
cb0d09759269a44e881706c7ab6a07d1c3dc5dcbcdbe9fc6dc90d5e69926eb134d3e9e468a2341df912a6b09cb6e497d8bc0d104208a007e5845e4faacf4972e  efficient-apriori-2.0.3.tar.gz
"
