Skip to content

Commit

Permalink
Support h5py for both python 3.9 and python 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
hoanphungt committed Dec 10, 2024
1 parent ab4030e commit c609c51
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down
7 changes: 7 additions & 0 deletions external-dependencies/populate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/ .
Expand Down

0 comments on commit c609c51

Please sign in to comment.