# 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.6
pkgrel=0
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="
5048b9e0b001a3892b2acc73a4ea4c9bfcafe728ba166603fcb87d838f8e376694f76c8fc1aabf669bffe89f8ae6e19d994b5a05f37425e7df35da6386cc85a4  efficient-apriori-2.0.6.tar.gz
"
