Build with shapely with geos 3.12.x (#2732)

authored-by: rejbasket
pull/2734/head
rejbasket 2024-02-21 16:01:47 +01:00 zatwierdzone przez GitHub
rodzic 3a697187ff
commit 9b3950137d
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
4 zmienionych plików z 67 dodań i 16 usunięć

Wyświetl plik

@ -86,7 +86,7 @@ jobs:
echo "${{ env.pythonLocation }}\bin" >> $GITHUB_PATH
- shell: bash
run: |
make dist
bin/build-linux-dist
env:
BUILD: linux
INKSTITCH_GPG_KEY: ${{ secrets.INKSTITCH_GPG_KEY }}
@ -128,6 +128,11 @@ jobs:
python -m pip install pyinstaller
echo "${{ env.pythonLocation }}\bin" >> $GITHUB_PATH
- name: install geos 32
shell: cmd
run: |
SET BUILD32="1"
bin\build-geos-win.cmd
- shell: bash
run: |
make dist
@ -180,6 +185,10 @@ jobs:
python -m pip install pyinstaller
echo "${{ env.pythonLocation }}\bin" >> $GITHUB_PATH
- name: install geos 64
shell: cmd
run: |
bin\build-geos-win.cmd
- shell: bash
run: |
make dist
@ -239,6 +248,10 @@ jobs:
# for networkx
pip install pandas
pip install pyarrow
# remove and build shapely with brew geos version
pip uninstall -y shapely
pip cache remove shapely
pip install -v shapely --no-binary shapely
pip install pyinstaller

Wyświetl plik

@ -8,21 +8,6 @@ if [ "$BUILD" = "osx" ]; then
# adding version to Info.plist
plutil -replace CFBundleShortVersionString -string ${VERSION} dist/inkstitch.app/Contents/Info.plist
rm -rf dist/inkstitch/
# unlinking the libgeos and dot dylib folder syslinks and fix broken syslinks for notary.
# copying libgeos dylibs with ditto preserves information to pass notary.
unlink dist/inkstitch.app/Contents/Resources/shapely/.dylibs
unlink dist/inkstitch.app/Contents/Resources/libgeos.3.11.2.dylib
unlink dist/inkstitch.app/Contents/Resources/libgeos_c.1.17.2.dylib
unlink dist/inkstitch.app/Contents/Frameworks/libgeos.3.11.2.dylib
unlink dist/inkstitch.app/Contents/Frameworks/libgeos_c.1.17.2.dylib
ditto dist/inkstitch.app/Contents/Frameworks/shapely/__dot__dylibs/libgeos.3.11.2.dylib dist/inkstitch.app/Contents/Resources/
ditto dist/inkstitch.app/Contents/Frameworks/shapely/__dot__dylibs/libgeos_c.1.17.2.dylib dist/inkstitch.app/Contents/Resources/
ditto dist/inkstitch.app/Contents/Frameworks/shapely/__dot__dylibs/libgeos.3.11.2.dylib dist/inkstitch.app/Contents/Frameworks/
ditto dist/inkstitch.app/Contents/Frameworks/shapely/__dot__dylibs/libgeos_c.1.17.2.dylib dist/inkstitch.app/Contents/Frameworks/
# Install location for pkgbuild
PKG_INSTALL_PATH="/tmp/inkstitch/"
# Checking arch of macos and setting path of electron for arm64 or intel

Wyświetl plik

@ -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

Wyświetl plik

@ -0,0 +1,24 @@
#!/usr/bin/env bash
# creating folder to install geos
mkdir $HOME/geos-build
GEOS_PATH=$HOME/geos-build
# Downloading geos
curl -O https://download.osgeo.org/geos/geos-3.12.1.tar.bz2
# uzipping geos
tar -xf geos-3.12.1.tar.bz2
cd geos-3.12.1
# Building geos
mkdir build && cd build && cmake -DCMAKE_INSTALL_PREFIX:PATH=$GEOS_PATH -DCMAKE_BUILD_TYPE=Release ..
make && make install
export PATH=$GEOS_PATH/bin:$PATH
export GEOS_INCLUDE_PATH=$GEOS_PATH/include
export GEOS_LIBRARY_PATH=$GEOS_PATH/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$GEOS_PATH/lib
cd ../..
python -m pip uninstall -y shapely
python -m pip cache remove shapely
python -m pip install -v shapely --no-binary shapely
make dist