# Contributor: omni <omni+alpine@hack.org>
# Maintainer:
pkgname=py3-dask-expr
pkgver=1.1.17
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 py3-dask py3-distributed py3-pyarrow"
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 (circular dependency)

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
	# Skip failed test test_groupby_index_array
	# https://github.com/dask/dask-expr/issues/789
	.testenv/bin/python3 -m pytest -k "not test_groupby_index_array"
}

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

sha512sums="
49bc90d9dedd7cfe68bfd1ce41f17c81599d3582365b83f3d86abeb2631251b28cb91c34596024ddf6bef62d0d5c73e2d2b03c43ba3c53a3248fb86129fa85b1  py3-dask-expr-1.1.17.tar.gz
"
