From 76a3e1d39df83f8e4b9412d459e8071988cbf5bd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 11 Mar 2020 13:42:50 +0200 Subject: [PATCH] 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 --- meson.build | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index db28c3c..d1d4af9 100644 --- a/meson.build +++ b/meson.build @@ -130,7 +130,12 @@ if build_gir pymod = import('python') python = pymod.find_installation(required: get_option('python')) 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 python_dep = dependency('', required: false) endif -- 2.7.4