From 9abd027b2381007f2b1893f495268b68109d3584 Mon Sep 17 00:00:00 2001 From: Boris Basic <boris.basic@edf.fr> Date: Tue, 8 Feb 2022 17:41:13 +0100 Subject: [PATCH] =?UTF-8?q?Replace=20Shapely=20with=20the=20version=20from?= =?UTF-8?q?=20Christoph=20Gohlke=E2=80=99s=20website?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build-telemac-deps.bat | 8 ++++++-- requirements.txt | 3 +-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/build-telemac-deps.bat b/build-telemac-deps.bat index 7efd30b..f5c752e 100644 --- a/build-telemac-deps.bat +++ b/build-telemac-deps.bat @@ -62,10 +62,12 @@ set aed2=libaed2-1.3.0 set gotm=gotm-2019-06-14-opentelemac set python=python-3.7.9 rem GDAL, Fiona and Rasterio Python cannot be installed using PyPI on Windows -rem We need to download unofficial wheels from Christoph Gohlke’s website +rem Also, the version of Shapely that comes through pip is unstable +rem Instead, we need to use unofficial wheels from Christoph Gohlke’s website set gdal=GDAL-3.4.1-cp37-cp37m-win_amd64.whl set fiona=Fiona-1.8.20-cp37-cp37m-win_amd64.whl set rasterio=rasterio-1.2.10-cp37-cp37m-win_amd64.whl +set shapely=Shapely-1.8.0-cp37-cp37m-win_amd64.whl pushd %~dp0deps @@ -292,14 +294,16 @@ rem Install all Python requirements for TELEMAC-MASCARET echo Installing Python requirements... pip install -r %~dp0requirements.txt || goto install_error -rem Download GDAL, Fiona and Rasterio unofficial wheels, to avoid building them locally +rem Download GDAL, Fiona, Rasterio and Shapely unofficial wheels, to avoid building them locally echo Downloading GDAL, Fiona and Rasterio... curl -O -J https://download.lfd.uci.edu/pythonlibs/x6hvwk7i/%gdal% || goto install_error curl -O -J https://download.lfd.uci.edu/pythonlibs/x6hvwk7i/%fiona% || goto install_error curl -O -J https://download.lfd.uci.edu/pythonlibs/x6hvwk7i/%rasterio% || goto install_error +curl -O -J https://download.lfd.uci.edu/pythonlibs/x6hvwk7i/%shapely% || goto install_error pip install %gdal% && del %gdal% pip install %fiona% && del %fiona% pip install %rasterio% && del %rasterio% +pip install %shapely% && del %shapely% pip install geopandas popd diff --git a/requirements.txt b/requirements.txt index f4ca8fa..fb4dcd6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -16,7 +16,6 @@ matplotlib pandas alphashape openpyxl -shapely pylint doxypypy -pyqt5 \ No newline at end of file +pyqt5 -- GitLab