# Contributor: omni <omni+alpine@hack.org>
# Maintainer:
pkgname=py3-dask-expr
pkgver=1.0.11
pkgrel=0
pkgdesc="Dask DataFrames with query optimization"
url="https://dask.org/"
arch="noarch"
license="BSD-3-Clause"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-python-versioneer
	py3-wheel
	"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/dask/dask-expr/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/dask-expr-$pkgver"
options="!check" # tests depend on py3-dask

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="
ddd4cd3582dc843a3dd7702f5a457df44d97b7b3828629d702c209f4b84fc1410b059029f82dc167ebefbf3de148aed7f54ecc69241c179c86bf66f9bbd19f41  py3-dask-expr-1.0.11.tar.gz
"
