Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions .github/workflows/packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ on:
type: string
REQUESTED_GEODIFF_VER:
description: 'Geodiff version'
default: '2.1.2'
default: '2.2.0'
type: string
env:
PYTHON_API_CLIENT_VER: ${{ inputs.REQUESTED_PYTHON_API_CLIENT_VER || '0.12.2' }}
GEODIFF_VER: ${{ inputs.REQUESTED_GEODIFF_VER || '2.1.2' }}
GEODIFF_VER: ${{ inputs.REQUESTED_GEODIFF_VER || '2.2.0' }}
PYTHON_VER: "38"
jobs:
build_linux_binary:
Expand Down Expand Up @@ -61,17 +61,11 @@ jobs:
run: |
choco install unzip
- name: Download pygeodiff 32 binaries
run: |
pip3 download --only-binary=:all: --no-deps --platform "win32" --python-version $env:PYTHON_VER pygeodiff==$env:GEODIFF_VER
unzip -o pygeodiff-$env:GEODIFF_VER-cp$env:PYTHON_VER-cp$env:PYTHON_VER-win32.whl -d tmp32
mkdir pygeodiff-binaries
copy tmp32\pygeodiff\*.pyd pygeodiff-binaries\
- name: Download pygeodiff 64 binaries
run: |
pip3 download --only-binary=:all: --no-deps --platform "win_amd64" --python-version $env:PYTHON_VER pygeodiff==$env:GEODIFF_VER
unzip -o pygeodiff-$env:GEODIFF_VER-cp$env:PYTHON_VER-cp$env:PYTHON_VER-win_amd64.whl -d tmp64
mkdir pygeodiff-binaries
copy tmp64\pygeodiff\*.pyd pygeodiff-binaries\
- uses: actions/upload-artifact@v4
Expand Down
4 changes: 4 additions & 0 deletions Mergin/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,8 @@ def add_context_menu_actions(self, layers):
self.iface.addCustomActionForLayer(self.action_export_mbtiles, l)

def unload(self):
from .utils import pygeodiff

if self.iface is not None:
# Disconnect Mergin related signals
self.iface.projectRead.disconnect(self.on_qgis_project_changed)
Expand All @@ -577,6 +579,8 @@ def unload(self):
QgsExpressionContextUtils.removeGlobalVariable("mm_user_email")
QgsApplication.instance().dataItemProviderRegistry().removeProvider(self.data_item_provider)
self.data_item_provider = None
# unload pygeodiff to avoid .pyd to be write-protected and thus impossible to delete on Windows
pygeodiff.shutdown()
# this is crashing qgis on exit
# self.iface.browserModel().reload()

Expand Down
Loading