# Contributor: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
# Maintainer: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
pkgname=py3-rexmex
pkgver=0.1.3
pkgrel=5
pkgdesc="A general purpose recommender metrics library for fair evaluation"
url="https://github.com/AstraZeneca/rexmex"
arch="noarch"
license="Apache-2.0"
depends="python3 py3-numpy py3-pandas py3-scipy py3-scikit-learn"
makedepends="py3-setuptools py3-gpep517 py3-wheel"
checkdepends="py3-pytest py3-pytest-runner"
subpackages="$pkgname-pyc"
source="https://github.com/AstraZeneca/rexmex/archive/v_00013/rexmex-$pkgver.tar.gz"
builddir="$srcdir/rexmex-v_00013"

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="
80cf22efaa6d725417e3280a30ddbce0a7f3339ef7d58bb08aadd50ae779be50ce6d300009b015928d1cb4c8bc264dc915fcec068ae8dfdf4afc5fa2341ec3e5  rexmex-0.1.3.tar.gz
"
