[arch-commits] Commit in python-h5py-openmpi/trunk (3 files)
Bruno Pagani
archange at archlinux.org
Sat Oct 31 15:41:15 UTC 2020
Date: Saturday, October 31, 2020 @ 15:41:14
Author: archange
Revision: 737839
upgpkg: python-h5py-openmpi 3.0.0-1
Switch to new way on enabling MPI.
Remove upstreamed patches.
Modified:
python-h5py-openmpi/trunk/PKGBUILD
Deleted:
python-h5py-openmpi/trunk/h5py-2.10.0-hdf5-v1.12-h5i.patch
python-h5py-openmpi/trunk/python-h5py-hd5-1.12.patch
----------------------------------+
PKGBUILD | 41 +++++++++++++++++++------------------
h5py-2.10.0-hdf5-v1.12-h5i.patch | 23 --------------------
python-h5py-hd5-1.12.patch | 37 ---------------------------------
3 files changed, 22 insertions(+), 79 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2020-10-31 15:39:25 UTC (rev 737838)
+++ PKGBUILD 2020-10-31 15:41:14 UTC (rev 737839)
@@ -4,51 +4,54 @@
_pkg=h5py
_mpi=openmpi
pkgname=python-${_pkg}-${_mpi}
-pkgver=2.10.0
-pkgrel=2
+pkgver=3.0.0
+pkgrel=1
pkgdesc="General-purpose Python bindings for the HDF5 library (${_mpi} version)"
arch=(x86_64)
url="https://www.h5py.org/"
license=(BSD)
-depends=(hdf5-${_mpi} python-numpy python-six python-mpi4py)
+depends=(hdf5-${_mpi} liblzf python-numpy python-mpi4py)
makedepends=(cython python-pkgconfig)
-checkdepends=(inetutils python-pytest)
+checkdepends=(inetutils python-pytest python-pytest-mpi python-pytables)
conflicts=(python-h5py)
provides=(python-h5py)
source=(https://files.pythonhosted.org/packages/source/h/${_pkg}/${_pkg}-${pkgver}.tar.gz
- python-h5py-hd5-1.12.patch
- h5py-2.10.0-hdf5-v1.12-h5i.patch)
-sha256sums=('84412798925dc870ffd7107f045d7659e60f5d46d1c70c700375248bf6bf512d'
- '0533a13f65de73ea9b61220cdb367038b441a61ac7468ebcda549a15c47f879b'
- 'b8686225d69b3bb103b5153a4783569eec98ca49be136623bcad18d140427e64')
+ h5py-system-lzf.patch::https://github.com/h5py/h5py/commit/da96e2b8b9f73fc67c128c9b65787b3527be119c.patch
+ h5py-py3.8-cached_property.patch::https://github.com/h5py/h5py/commit/a87984f0bc2b2596948880d2ec38196017e275fc.patch)
+sha256sums=('7d3803be1b530c68c2955faba726dc0f591079b68941a0c0269b5384a42ab519'
+ '665c15ffc714788749f4e0d731775cb927593fed496097e4abf2174612d9a747'
+ '4d5cdf7af4ea5d79ec0ac39f178ef55fe6f571efb76a008e553c4b3030730372')
validpgpkeys=(AC47F71DB275ECD0B3DA46E857FA4540DD4EFCF7 # Thomas A Caswell (Brookhaven National Lab) <tcaswell at bnl.gov>
96B7334D7610EE3E68AFFE589E027116943D6A8B) # Thomas A Caswell <tcaswell at bnl.gov> (new key)
# See https://github.com/h5py/h5py/issues/1299 about lack of GPG sigs for recent releases
prepare() {
+ cd ${_pkg}-${pkgver}
# Remove RPATH
- sed -i "s/settings\\['runtime_library_dirs'\\] = settings\\['library_dirs'\\]/pass/" ${_pkg}-${pkgver}/setup_build.py
- cd ${_pkg}-${pkgver}
- patch -p1 -i ../h5py-2.10.0-hdf5-v1.12-h5i.patch
- patch -p1 -i ../python-h5py-hd5-1.12.patch
+ sed -i "s/settings\\['runtime_library_dirs'\\] = settings\\['library_dirs'\\]/pass/" setup_build.py
+ # Build against system lzf
+ patch -Np1 -i ../h5py-system-lzf.patch
+ # cached_property is included in python 3.8
+ patch -Np1 -i ../h5py-py3.8-cached_property.patch
}
build() {
export CC=mpicc
cd ${_pkg}-${pkgver}
- python setup.py configure --mpi
- python setup.py build
+ HDF5_MPI="ON" H5PY_SYSTEM_LZF=1 python setup.py build
}
check() {
cd ${_pkg}-${pkgver}
- # Ongoing issues with hdf5 1.12 https://github.com/h5py/h5py/pull/1536
- python setup.py test || warning "Tests failed"
+# local python_version=$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')
+# PYTHONPATH="$PWD/build/lib.linux-$CARCH-${python_version}" mpirun -n {env:MPI_N_PROCS:2} python -m pytest --pyargs h5py -rxXs --with-mpi
+# PYTHONPATH="$PWD/build/lib.linux-$CARCH-${python_version}" mpirun python -m pytest --pyargs h5py -rxXs --with-mpi
+ HDF5_MPI="ON" python setup.py test
+
}
package() {
cd ${_pkg}-${pkgver}
- python setup.py install --root="${pkgdir}" --skip-build --optimize=1
-
+ HDF5_MPI="ON" python setup.py install --root="${pkgdir}" --skip-build --optimize=1
install -Dm644 licenses/license.txt -t "${pkgdir}"/usr/share/licenses/${pkgname}/
}
Deleted: h5py-2.10.0-hdf5-v1.12-h5i.patch
===================================================================
--- h5py-2.10.0-hdf5-v1.12-h5i.patch 2020-10-31 15:39:25 UTC (rev 737838)
+++ h5py-2.10.0-hdf5-v1.12-h5i.patch 2020-10-31 15:41:14 UTC (rev 737839)
@@ -1,23 +0,0 @@
-diff --git a/h5py/api_types_hdf5.pxd b/h5py/api_types_hdf5.pxd
-index a282ecc..5bc76fa 100644
---- a/h5py/api_types_hdf5.pxd
-+++ b/h5py/api_types_hdf5.pxd
-@@ -297,7 +297,6 @@ cdef extern from "hdf5.h":
- H5I_DATASPACE, # group ID for Dataspace objects
- H5I_DATASET, # group ID for Dataset objects
- H5I_ATTR, # group ID for Attribute objects
-- H5I_REFERENCE, # group ID for Reference objects
- H5I_VFL, # group ID for virtual file layer
- H5I_GENPROP_CLS, # group ID for generic property list classes
- H5I_GENPROP_LST, # group ID for generic property lists
-diff --git a/h5py/h5i.pyx b/h5py/h5i.pyx
-index 9033d50..bb5867c 100644
---- a/h5py/h5i.pyx
-+++ b/h5py/h5i.pyx
-@@ -23,6 +23,5 @@ DATASPACE = H5I_DATASPACE
- DATASET = H5I_DATASET
- ATTR = H5I_ATTR
--REFERENCE = H5I_REFERENCE
- GENPROP_CLS = H5I_GENPROP_CLS
- GENPROP_LST = H5I_GENPROP_LST
- DATATYPE = H5I_DATATYPE
Deleted: python-h5py-hd5-1.12.patch
===================================================================
--- python-h5py-hd5-1.12.patch 2020-10-31 15:39:25 UTC (rev 737838)
+++ python-h5py-hd5-1.12.patch 2020-10-31 15:41:14 UTC (rev 737839)
@@ -1,37 +0,0 @@
-diff --git a/h5py/_conv.pyx b/h5py/_conv.pyx
-index 9bc8f5cf8..93cc6fdf4 100644
---- a/h5py/_conv.pyx
-+++ b/h5py/_conv.pyx
-@@ -400,7 +400,7 @@ cdef int conv_regref2pyref(void* ipt, void* opt, void* bkg, void* priv) except -
- cdef PyObject* bkg_obj0
-
- memcpy(&bkg_obj0, bkg_obj, sizeof(bkg_obj0));
-- memcpy(ref.ref.reg_ref, buf_ref, sizeof(hdset_reg_ref_t))
-+ memcpy(ref.ref.reg_ref.data, buf_ref, sizeof(hdset_reg_ref_t))
-
- ref.typecode = H5R_DATASET_REGION
-
-@@ -430,7 +430,7 @@ cdef int conv_pyref2regref(void* ipt, void* opt, void* bkg, void* priv) except -
- if not isinstance(obj, RegionReference):
- raise TypeError("Can't convert incompatible object to HDF5 region reference")
- ref = <RegionReference>(buf_obj0)
-- memcpy(buf_ref, ref.ref.reg_ref, sizeof(hdset_reg_ref_t))
-+ memcpy(buf_ref, ref.ref.reg_ref.data, sizeof(hdset_reg_ref_t))
- else:
- memset(buf_ref, c'\0', sizeof(hdset_reg_ref_t))
-
-diff --git a/h5py/h5r.pxd b/h5py/h5r.pxd
-index 53bbaf496..825b798fa 100644
---- a/h5py/h5r.pxd
-+++ b/h5py/h5r.pxd
-@@ -13,7 +13,9 @@ from .defs cimport *
- cdef extern from "hdf5.h":
-
- ctypedef haddr_t hobj_ref_t
-- ctypedef unsigned char hdset_reg_ref_t[12]
-+
-+cdef struct hdset_reg_ref_t:
-+ uint8_t data[12] # sizeof(haddr_t) + 4 == sizeof(signed long long) + 4
-
- cdef union ref_u:
- hobj_ref_t obj_ref
More information about the arch-commits
mailing list