Skip to content

gst-python: Fix Python library name fetching and library searching on Windows

Nirbheek Chauhan requested to merge nirbheek/gstreamer:gstpy-get_variable into main
meson: Fix Python library name fetching on Windows

`python.get_variable('FOO', [])` becomes `python.get_variable('FOO')`
due to how Meson treats empty arrays in arguments, which breaks the
fallback feature of get_variable().

So we need to actually check whether the variable exists before trying
to fetch it.
meson: Fix Python library searching on Windows

Neither LIBDIR nor LIBPL are set with the native windows Python
(unlike MSYS2), so we need to use `prefix` which takes us to the
rootdir of the Python installation.

The name is also different: it's python312.dll, not python3.12.dll.

Fixes #3368 (closed)

Supersedes !6312 (closed)

This gets us to a better state than before, where at least the python library name and the path are auto-detected correctly, but the python plugin is still not loadable inside the devenv because the _gi.*.pyd file is not loaded for some reason, even after I set PYTHONPATH to the right directory. That's for another time then.

Edited by Nirbheek Chauhan

Merge request reports