From a37a74bad5ff6a14f2ff254cdff347a572c6f97d Mon Sep 17 00:00:00 2001 From: Peter Limkilde Svendsen <34237736+plimkilde@users.noreply.github.com> Date: Mon, 25 Mar 2024 15:59:37 +0100 Subject: [PATCH] Add Python 3.8 and 3.12 to test matrix (#62) * Add Python 3.12 to test matrix * Try adding libgcc dependency on Windows * Revert "Try adding libgcc dependency on Windows" This reverts commit 7def5c34b08fae74d826f006c8d88f3d171c7cf9. * Try showing libdelaunator deps on Windows * Also show deps using dumpbin * Revert "Also show deps using dumpbin" This reverts commit 9c610161b5781bc7fdf4e245a1a1665af1f1d7b9. * Try loading libdelaunator.dll with winmode=0 * Cleaner winmode * Also try re-adding Python 3.8 --- .github/workflows/build.yml | 6 ++++-- qc/thatsDEM/triangle.py | 2 +- readme.md | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9da2804..c3d213f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,7 +10,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v2 @@ -36,7 +36,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v2 @@ -50,6 +50,8 @@ jobs: shell: cmd /C CALL {0} run: >- python src/build/build.py -v -x64 -force -cc gcc -cxx g++ + - name: Show libdelaunator dependencies + run: ldd qc/thatsDEM/lib/libdelaunator.dll - name: Test with pytest shell: cmd /C CALL {0} run: >- diff --git a/qc/thatsDEM/triangle.py b/qc/thatsDEM/triangle.py index a44cdb7..f44c58b 100644 --- a/qc/thatsDEM/triangle.py +++ b/qc/thatsDEM/triangle.py @@ -45,7 +45,7 @@ delaunator_lib_name = os.path.join(LIBDIR, DELAUNATOR_LIBNAME) # Load library directly via ctypes. Could also have used the numpy interface. lib = ctypes.cdll.LoadLibrary(lib_name) -delaunator_lib = ctypes.cdll.LoadLibrary(delaunator_lib_name) +delaunator_lib = ctypes.CDLL(delaunator_lib_name, winmode=ctypes.RTLD_GLOBAL) # Args and return types of c functions. Corresponds to a header file. lib.free_index.restype = None lib.free_index.argtypes = [ctypes.c_void_p] diff --git a/readme.md b/readme.md index ac26ea5..bd2e8b3 100644 --- a/readme.md +++ b/readme.md @@ -11,7 +11,8 @@ Derived datasets suchs as DEMs and vector geometries can be extracted from a poi ## Requirements ## -DHMQC is currently supported on Windows and Linux, with Python versions 3.9, 3.10 and 3.11. The recommended way of installing DHMQC is using a Conda environment. +DHMQC is currently supported on Windows and Linux, with Python versions 3.8 through 3.12. The recommended way of +installing DHMQC is using a Conda environment. Installation requires a C and C++ compiler. Currently, only `gcc`/`g++` are supported (on Windows via MinGW-w64).