mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-24 03:35:38 +03:00
we never use pip in the venv manually made for tests- this might break 1-2 things unexpectedly, but - those should be looked at anyway - this has a severe speedup- even on a desktop machine with nvme, this makes an arbitrary venv go from 2.6s to <100ms(!) to make. a nice small optimisation.
69 lines
1.5 KiB
Text
69 lines
1.5 KiB
Text
# Contributor: James White <stegoxorus@gmail.com>
|
|
# Maintainer: James White <stegoxorus@gmail.com>
|
|
pkgname=py3-h5py
|
|
pkgver=3.8.0
|
|
pkgrel=0
|
|
pkgdesc="Read and write HDF5 files from Python"
|
|
url="https://www.h5py.org"
|
|
arch="all"
|
|
license="BSD-3-Clause"
|
|
depends="python3 py3-numpy"
|
|
makedepends="
|
|
cython
|
|
hdf5-dev
|
|
liblzf-dev
|
|
py3-gpep517
|
|
py3-numpy-dev
|
|
py3-pkgconfig
|
|
py3-setuptools
|
|
py3-wheel
|
|
python3-dev
|
|
"
|
|
checkdepends="
|
|
py3-pytest
|
|
py3-pytest-mpi
|
|
py3-pytest-xdist
|
|
"
|
|
source="https://github.com/h5py/h5py/releases/download/$pkgver/h5py-$pkgver.tar.gz"
|
|
case "$CARCH" in
|
|
x86|armv7|ppc64le) options="!check" ;; # Failing
|
|
esac
|
|
|
|
builddir="$srcdir/h5py-$pkgver"
|
|
|
|
replaces="py-h5py" # Backwards compatibility
|
|
provides="py-h5py=$pkgver-r$pkgrel" # Backwards compatibility
|
|
|
|
prepare() {
|
|
default_prepare
|
|
sed -i "s/settings\\['runtime_library_dirs'\\] = settings\\['library_dirs'\\]/pass/" setup_build.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() {
|
|
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 -m installer -d "$pkgdir" \
|
|
dist/*.whl
|
|
|
|
rm -r "$pkgdir"/usr/lib/python3*/site-packages/h5py/tests
|
|
}
|
|
|
|
sha512sums="
|
|
13397f66a9fc735e1143eb9e3dd584280e955adf49de467bf56c1a98952903720480ab8d505921b7e22c16453498625ad93421a64e520f15ea3566472849a8fd h5py-3.8.0.tar.gz
|
|
"
|