Fix build with Python 3.8 by also checking for python-3.X-embed.pc

Since Python 3.8 the normal checks don't include the Python libraries
anymore and linking of the Python formatters would fail.

See also https://github.com/mesonbuild/meson/issues/5629
and https://gitlab.freedesktop.org/gstreamer/gst-python/issues/28
This commit is contained in:
Sebastian Dröge 2020-03-11 13:42:50 +02:00
parent 1f919dae98
commit 76a3e1d39d

View file

@ -130,7 +130,12 @@ if build_gir
pymod = import('python') pymod = import('python')
python = pymod.find_installation(required: get_option('python')) python = pymod.find_installation(required: get_option('python'))
if python.found() if python.found()
python_dep = python.dependency(required : get_option('python')) # Workaround for https://github.com/mesonbuild/meson/issues/5629
pythonver = python.language_version()
python_dep = dependency('python-@0@-embed'.format(pythonver), version: '>=3', required: false)
if not python_dep.found()
python_dep = python.dependency(required : get_option('python'))
endif
else else
python_dep = dependency('', required: false) python_dep = dependency('', required: false)
endif endif