aboutsummaryrefslogtreecommitdiffstats
path: root/community/py3-h5py/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/py3-h5py/APKBUILD')
-rw-r--r--community/py3-h5py/APKBUILD46
1 files changed, 31 insertions, 15 deletions
diff --git a/community/py3-h5py/APKBUILD b/community/py3-h5py/APKBUILD
index 9947f4c61ff..c867231c8d0 100644
--- a/community/py3-h5py/APKBUILD
+++ b/community/py3-h5py/APKBUILD
@@ -1,32 +1,36 @@
# Contributor: James White <stegoxorus@gmail.com>
# Maintainer: James White <stegoxorus@gmail.com>
pkgname=py3-h5py
-pkgver=3.1.0
+pkgver=3.10.0
pkgrel=1
pkgdesc="Read and write HDF5 files from Python"
url="https://www.h5py.org"
-# mips64 blocked by py3-numpy
-arch="all !mips64"
+# 32-bit: tests fail due to size mismatch between python and cython, broken
+arch="all !x86 !armhf !armv7"
license="BSD-3-Clause"
-depends="python3"
+depends="py3-numpy"
makedepends="
cython
hdf5-dev
liblzf-dev
+ py3-gpep517
py3-numpy-dev
py3-pkgconfig
py3-setuptools
+ py3-wheel
python3-dev
"
checkdepends="
- py3-pytest-mpi
py3-pytest
+ py3-pytest-mpi
+ py3-pytest-xdist
"
-source="https://files.pythonhosted.org/packages/source/h/h5py/h5py-$pkgver.tar.gz"
+subpackages="$pkgname-pyc"
+source="$pkgname-$pkgver.tar.gz::https://github.com/h5py/h5py/archive/refs/tags/$pkgver.tar.gz
+ cython3.patch"
case "$CARCH" in
- x86|armv7|ppc64le) options="!check" ;; # Failing
+ppc64le) options="!check" ;; # failing
esac
-
builddir="$srcdir/h5py-$pkgver"
replaces="py-h5py" # Backwards compatibility
@@ -36,21 +40,33 @@ prepare() {
default_prepare
sed -i "s/settings\\['runtime_library_dirs'\\] = settings\\['library_dirs'\\]/pass/" setup_build.py
- export H5PY_SYSTEM_LZF=1
- # Stop requiring a specific version of numpy
- export H5PY_SETUP_REQUIRES=0
}
build() {
- python3 setup.py build
+ export H5PY_SYSTEM_LZF=1
+ # Stop requiring a specific version of numpy
+ export H5PY_SETUP_REQUIRES=0
+ gpep517 build-wheel \
+ --wheel-dir .dist \
+ --output-fd 3 3>&1 >&2
}
check() {
- python3 setup.py test
+ rm -rf testenv
+ python3 -m venv --clear --without-pip --system-site-packages .testenv
+ .testenv/bin/python3 -m installer .dist/*.whl
+ cd .testenv
+ bin/python3 -m pytest -n ${JOBS:-2} --pyargs h5py
}
package() {
- python3 setup.py install --prefix=/usr --root="$pkgdir"
+ python3 -m installer -d "$pkgdir" \
+ .dist/*.whl
+
+ rm -r "$pkgdir"/usr/lib/python3*/site-packages/h5py/tests
}
-sha512sums="cc01a326e2e12a976834c26f06aceaeb42eae655d3b3150827e15645aee84402523e11ae8b72636af46ce4895ba0f846cdfbcd979668660bbcca3f18c73b7817 h5py-3.1.0.tar.gz"
+sha512sums="
+5a403ab04890173adac9148f81a00ee6b9f4151ab4403fae60c59d91fecfe0f33f9fe66e83622b9350e76049816ee546868bac162a61067213fbb540bbc4bbba py3-h5py-3.10.0.tar.gz
+9f498e04942cf64458e4b2d3e1607fc857ae16db8f180ba694fc45f1094f16524bf5f3061d5b4ec9de5738494fbc9aa229af3ae47ddab3e3c014c2557053870e cython3.patch
+"