Skip to content

geodms.pyd Python version matching across .m / .c installers + user-installed Python/GDAL #1105

@MaartenHilferink

Description

@MaartenHilferink

Symptom

The Python binding geodms.pyd is linked against different Python ABIs in the two Windows installers:

Setup geodms.pyd deps
.m (msbuild) python3.dll, python313.dll
.c (cmake) python312.dll

The .c setup bundles python312.dll next to geodms.pyd so the binding is self-contained. The .m setup ships no python*.dllgeodms.pyd only loads if a matching Python 3.13 runtime happens to be on the user's PATH or in the install dir.

Even when a runtime is found, the version-mismatch story for users who already have Python and/or GDAL pinned to a different version is unsolved:

  • A user with Python 3.12 installed can use the .c binding but not the .m one.
  • A user with QGIS / OSGeo4W (often ships its own Python and GDAL) may have conflicts on gdal.dll / proj.dll paths even when the Python version matches.
  • geodms.pyd is also linked against the project's bundled gdal.dll — if the user's pre-existing Python loads a different GDAL first, behaviour is undefined.

What needs deciding

  1. Pick one Python version per release line and align both Windows installers + Linux build. Pin via vcpkg manifest or a top-level CMake var.
  2. Decide on the runtime-supply policy:
    • bundle pythonXYZ.dll next to geodms.pyd (self-contained, current .c behaviour); or
    • declare Python a hard prereq and document the exact version users must install; or
    • support multiple Python versions via per-version geodms_py3XY.pyd artifacts.
  3. GDAL coexistence: geodms.pyd linked against bundled gdal.dll should not collide with a user's QGIS/OSGeo4W GDAL when both are on PATH. May need DLL search-order shim or rpath equivalent.
  4. Linux: the .l build links against the system libpython3.so and libgdal.so via vcpkg — clarify the supported range, document in Installation Instructions wiki.

Workaround for now

.c installer's bundled python312.dll covers the standalone case.
.m installer + Python binding requires the user to have Python 3.13 (cpython.org installer) on PATH. Don't ship the .m Python binding to users who don't already have a matching runtime.

Discovered while comparing the v20.0.0 .m and .c installers (#release-v20.0.0).

Metadata

Metadata

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions