ges: Fix Xcode-provided Python library name fetching

Both INSTSONAME and LDLIBRARY point to the Python interpreter, not to
libpythonX.Y.dylib, unlike the pythonX.Y-embed module Xcode provides.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8199>
This commit is contained in:
L. E. Segovia 2025-01-08 11:47:34 -03:00 committed by GStreamer Marge Bot
parent 06192c125b
commit bc285dbbbe

View File

@ -188,6 +188,7 @@ elif build_gir and python.found()
pylib_suffix = 'dylib'
endif
pylib_fnames = []
if host_system != 'darwin' # Ignore system Python (INSTSONAME points to the Python3 executable and not libpython3.9.dylib)
# Library name with soversion, non-devel package
if python.has_variable('INSTSONAME')
pylib_fnames += python.get_variable('INSTSONAME')
@ -196,6 +197,7 @@ elif build_gir and python.found()
if python.has_variable('LDLIBRARY')
pylib_fnames += python.get_variable('LDLIBRARY')
endif
endif
# Manually construct name as a fallback
pylib_fnames += [
pylib_prefix + 'python' + pylib_ver + python_abi_flags + '.' + pylib_suffix