python-h5py: Support multi-digit SOVERSION of HDF5 library.

This commit is contained in:
Markus Mützel
2023-01-25 12:25:57 +01:00
committed by Markus Mützel
parent 205f329c02
commit bc35eb4ec0
2 changed files with 27 additions and 2 deletions

View File

@@ -0,0 +1,12 @@
diff -urN h5py-3.8.0/setup_configure.py.orig h5py-3.8.0/setup_configure.py
--- h5py-3.8.0/setup_configure.py.orig 2023-01-04 18:26:33.000000000 +0100
+++ h5py-3.8.0/setup_configure.py 2023-01-25 12:01:14.626392300 +0100
@@ -250,7 +250,7 @@
regexp = re.compile(r'^hdf5.dll')
else:
default_path = 'libhdf5-0.dll'
- regexp = re.compile(r'^libhdf5-[0-9].dll')
+ regexp = re.compile(r'^libhdf5-\d+.dll$')
if sys.version_info >= (3, 8):
# To overcome "difficulty" loading the library on windows
# https://bugs.python.org/issue42114

View File

@@ -7,7 +7,7 @@ provides=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
conflicts=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
replaces=("${MINGW_PACKAGE_PREFIX}-python3-${_realname}")
pkgver=3.8.0
pkgrel=2
pkgrel=3
pkgdesc="General-purpose Python bindings for the HDF5 library (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32')
@@ -22,14 +22,26 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-python-setuptools"
"${MINGW_PACKAGE_PREFIX}-python-pkgconfig"
"${MINGW_PACKAGE_PREFIX}-pkg-config")
source=(https://github.com/h5py/h5py/releases/download/${pkgver}/h5py-${pkgver}.tar.gz
0001-multi-digit-SOVERSION.patch
lzf_c.c.patch)
sha256sums=('6fead82f0c4000cf38d53f9c030780d81bfa0220218aee13b90b7701c937d95f'
'b522515e3688acac0ca1a50265a2aa2009ec6df55f0d205b72e5dea5fd494705'
'6d0126b881b5dcd637146d151341b72aa68eef760092272279072ec0bc4ceca9')
apply_patch_with_msg() {
for _patch in "$@"
do
msg2 "Applying $_patch"
patch -Np1 -i "${srcdir}/$_patch"
done
}
prepare() {
cd "${srcdir}/${_realname}-${pkgver}"
patch -p1 -i ${srcdir}/lzf_c.c.patch
apply_patch_with_msg \
0001-multi-digit-SOVERSION.patch \
lzf_c.c.patch
cd "${srcdir}"
rm -rf "python-build-${MSYSTEM}" | true
@@ -40,6 +52,7 @@ build() {
cd "${srcdir}/python-build-${MSYSTEM}"
H5PY_SETUP_REQUIRES=0 \
HDF5_DIR=${MINGW_PREFIX} \
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
${MINGW_PREFIX}/bin/python setup.py build
}