From 9b3950137db88715ac55d1e9bebc9aea2db4e83e Mon Sep 17 00:00:00 2001 From: rejbasket <39080670+rejbasket@users.noreply.github.com> Date: Wed, 21 Feb 2024 16:01:47 +0100 Subject: Build with shapely with geos 3.12.x (#2732) authored-by: rejbasket --- bin/build-geos-win.cmd | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 bin/build-geos-win.cmd (limited to 'bin/build-geos-win.cmd') diff --git a/bin/build-geos-win.cmd b/bin/build-geos-win.cmd new file mode 100755 index 00000000..c2b5d4b7 --- /dev/null +++ b/bin/build-geos-win.cmd @@ -0,0 +1,29 @@ +@echo off +mkdir %CD%\geos-build +SET GEOS_INSTALL=%CD%\geos-build + +if NOT DEFINED BUILD32 (SET BUILDFLAG="x64") else (SET BUILDFLAG="Win32") +echo %BUILDFLAG% + +curl -O https://download.osgeo.org/geos/geos-3.12.1.tar.bz2 + +7z x geos-3.12.1.tar.bz2 +7z x geos-3.12.1.tar + +cd geos-3.12.1 +cmake -S . -B _build -G "Visual Studio 17 2022" -A %BUILDFLAG% -DCMAKE_INSTALL_PREFIX=%GEOS_INSTALL% -DCMAKE_GENERATOR_TOOLSET=host=x64 + +cmake --build _build --config Release -j 16 --verbose +cd _build +cmake --install . + +SET PATH=%GEOS_INSTALL%\bin;%PATH% +SET GEOS_INCLUDE_PATH=%GEOS_INSTALL%\include +set GEOS_LIBRARY_PATH=%GEOS_INSTALL%\lib + +xcopy %GEOS_INSTALL%\bin\geos_c.dll %pythonLocation% /E /H /C /I +xcopy %GEOS_INSTALL%\bin\geos.dll %pythonLocation% /E /H /C /I + +python -m pip uninstall -y shapely +python -m pip cache remove shapely +python -m pip install -v shapely --no-binary shapely -- cgit v1.2.3