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

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