From c609c51630c457efab86f301165c23f49e8fdfae Mon Sep 17 00:00:00 2001 From: Hoan Phung Date: Tue, 10 Dec 2024 10:31:09 +0100 Subject: [PATCH] Support h5py for both python 3.9 and python 3.12 --- dependencies.py | 5 ++++- external-dependencies/populate.sh | 7 +++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/dependencies.py b/dependencies.py index dc0a0596..8c523fbc 100644 --- a/dependencies.py +++ b/dependencies.py @@ -85,9 +85,12 @@ if QGIS_VERSION < 32806 and platform.system() == "Windows": SUPPORTED_HDF5_VERSIONS = ["1.10.7"] H5PY_DEPENDENCY = Dependency("h5py", "h5py", "==2.10.0", False) +elif QGIS_VERSION >= 34000 and platform.system() == "Windows": + SUPPORTED_HDF5_VERSIONS = ["1.14.0"] + H5PY_DEPENDENCY = Dependency("h5py", "h5py", "==3.10.0", False) else: SUPPORTED_HDF5_VERSIONS = ["1.14.0"] - H5PY_DEPENDENCY = Dependency("h5py", "h5py", "==3.10.0", True) + H5PY_DEPENDENCY = Dependency("h5py", "h5py", "==3.8.0", True) WINDOWS_PLATFORM_DEPENDENCIES = [Dependency("scipy", "scipy", "==1.6.2", False)] if QGIS_VERSION >= 32811 and platform.system() == "Windows": diff --git a/external-dependencies/populate.sh b/external-dependencies/populate.sh index d70cbbaa..3f214977 100755 --- a/external-dependencies/populate.sh +++ b/external-dependencies/populate.sh @@ -40,6 +40,13 @@ mkdir build cd build # Download the custom compiled qgis version tar of h5py, create a tar from the distro subfolder +# Download h5py 3.8.0 for QGis versions before 3.40 +wget http://download.osgeo.org/osgeo4w/v2/x86_64/release/python3/python3-h5py/python3-h5py-3.8.0-1.tar.bz2 +tar -xvf python3-h5py-3.8.0-1.tar.bz2 +tar -cf h5py-3.8.0.tar -C ./apps/Python39/Lib/site-packages/ . +cp h5py-3.8.0.tar .. + +# Download h5py 3.10.0 for QGis versions after 3.40 wget http://download.osgeo.org/osgeo4w/v2/x86_64/release/python3/python3-h5py/python3-h5py-3.10.0-1.tar.bz2 tar -xvf python3-h5py-3.10.0-1.tar.bz2 tar -cf h5py-3.10.0.tar -C ./apps/Python312/Lib/site-packages/ .