Skip to content

Commit

Permalink
Support scipy for both python 3.9 and 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
hoanphungt committed Dec 10, 2024
1 parent c609c51 commit 174854f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
11 changes: 9 additions & 2 deletions dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,18 @@
SUPPORTED_HDF5_VERSIONS = ["1.14.0"]
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":
if QGIS_VERSION < 32811 and platform.system() == "Windows":
WINDOWS_PLATFORM_DEPENDENCIES = [
Dependency("scipy", "scipy", "==1.6.2", True),
]
elif QGIS_VERSION >= 34000 and platform.system() == "Windows":
WINDOWS_PLATFORM_DEPENDENCIES = [
Dependency("scipy", "scipy", "==1.13.0", True),
]
else:
WINDOWS_PLATFORM_DEPENDENCIES = [
Dependency("scipy", "scipy", "==1.10.1", False),
]

# If you add a dependency, also adjust external-dependencies/populate.sh
INTERESTING_IMPORTS = ["numpy", "osgeo", "pip", "setuptools"]
Expand Down
7 changes: 7 additions & 0 deletions external-dependencies/populate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@ tar -cf h5py-3.10.0.tar -C ./apps/Python312/Lib/site-packages/ .
cp h5py-3.10.0.tar ..

# as well as scipy
# Download scipy 1.6.2 for QGis versions before 3.40
wget http://download.osgeo.org/osgeo4w/v2/x86_64/release/python3/python3-scipy/python3-scipy-1.10.1-1.tar.bz2
tar -xvf python3-scipy-1.10.1-1.tar.bz2
tar -cf scipy-1.10.1.tar -C ./apps/Python39/Lib/site-packages/ .
cp scipy-1.10.1.tar ..

# Download scipy 1.13.0 for QGis versions after 3.40
wget http://download.osgeo.org/osgeo4w/v2/x86_64/release/python3/python3-scipy/python3-scipy-1.13.0-1.tar.bz2
tar -xvf python3-scipy-1.13.0-1.tar.bz2
tar -cf scipy-1.13.0.tar -C ./apps/Python312/Lib/site-packages/ .
Expand Down

0 comments on commit 174854f

Please sign in to comment.