diff --git a/srcpkgs/python3-h5py/template b/srcpkgs/python3-h5py/template index c95ea6d7bee..1928815fe79 100644 --- a/srcpkgs/python3-h5py/template +++ b/srcpkgs/python3-h5py/template @@ -1,10 +1,10 @@ # Template file for 'python3-h5py' pkgname=python3-h5py version=3.13.0 -revision=1 +revision=2 build_style=python3-module build_helper="numpy" -hostmakedepends="python3-setuptools python3-Cython python3-pkgconfig" +hostmakedepends="python3-setuptools python3-Cython python3-pkgconfig hdf5-devel" makedepends="python3-devel hdf5-devel" depends="python3-numpy" short_desc="HDF5 for Python" @@ -16,6 +16,14 @@ checksum=1870e46518720023da85d0895a1960ff2ce398c5671eac3b1a41ec696b7105c3 # Tests require unpackaged pytest-mpi make_check=no +post_patch() { + if [ -n "$CROSS_BUILD" ] && [ "$XBPS_TARGET_WORDSIZE" = "32" ]; then + # numpy.complex256 is N/A on 32 bit; it is misdetected if host is 64 bit + # we need `DEF COMPLEX256_SUPPORT = False`, this seems the easiest way + vsed -e 's/{complex256_support}/False/' -i setup_build.py + fi +} + pre_build() { # Build in parallel make_build_args+=" ${makejobs}"