1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-15 04:05:15 +03:00
aports/community/py3-xarray/APKBUILD
mio 51d396ca98 community/py3-xarray: upgrade to 2025.4.0, skip failed tests on 32-bit arches
https://github.com/pydata/xarray/releases/tag/v2025.04.0
https://github.com/pydata/xarray/releases/tag/v2025.03.1
https://github.com/pydata/xarray/releases/tag/v2025.03.0
https://github.com/pydata/xarray/releases/tag/v2025.01.2
https://github.com/pydata/xarray/releases/tag/v2025.01.1
https://github.com/pydata/xarray/releases/tag/v2025.01.0

Also add patch to remove unrecognised pytest options, and skip failed
tests on 32-bit arches.

```
ERROR: usage: __main__.py [options] [file_or_dir] [file_or_dir] [...]
__main__.py: error: unrecognized arguments: --mypy-only-local-stub --mypy-pyproject-toml-file=pyproject.toml
  inifile: [...]/py3-xarray/src/xarray-2025.4.0/pyproject.toml
  rootdir: [...]/py3-xarray/src/xarray-2025.4.0
```
2025-05-03 19:10:08 +00:00

49 lines
1.5 KiB
Text

# Contributor: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
# Maintainer:
pkgname=py3-xarray
_pkgorig=xarray
pkgver=2025.4.0
pkgrel=0
pkgdesc="N-D labeled arrays and datasets in Python"
url="https://xarray.dev"
arch="noarch"
license="Apache-2.0"
depends="python3 py3-numpy py3-packaging py3-pandas"
makedepends="py3-gpep517 py3-setuptools_scm py3-wheel"
checkdepends="py3-coverage py3-mock py3-pytest-xdist py3-pytest-cov"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/x/xarray/xarray-$pkgver.tar.gz
fix-pytest-ini-options.patch
"
builddir="$srcdir/$_pkgorig-$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
case "$CARCH" in
# Tests fail on 32-bit arches
armhf|armv7|x86) .testenv/bin/python3 -m pytest -k \
'not test_repr_truncates_nodes and not test_doc_example' ;;
*) .testenv/bin/python3 -m pytest ;;
esac
}
package() {
python3 -m installer -d "$pkgdir" \
.dist/*.whl
rm -r "$pkgdir"/usr/lib/python3.*/site-packages/xarray/tests
}
sha512sums="
8018bf2431f30194d057e363f8a72fb7ef99834ae14daec5b98e5e101b42c7b1199d583eb9621c9955830bb15b3c197b08e71c6a299abeb42a6a215a57ea5995 py3-xarray-2025.4.0.tar.gz
c14100a3667e1a0661049a88c1286bbad104608e02cfc52f095a01cfb1a46464581c9cab69d3ddc0956dba6842a805f49f3728221a0d77c1ea14c3d2b8954ea7 fix-pytest-ini-options.patch
"