0001-fix-builds-with-python-3.8.patch 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. From 10707f437f2fc3632067c6a0efa4432f7ebaf362 Mon Sep 17 00:00:00 2001
  2. From: Sebastian Dröge <sebastian@centricular.com>
  3. Date: Fri, 13 Dec 2019 10:46:20 +0200
  4. Subject: [PATCH] backport of "fix build with Python 3.8 by also checking for
  5. python-3.X-embed.pc"
  6. Since Python 3.8 the normal checks don't include the Python libraries
  7. anymore and linking of the gst-python module would fail.
  8. See also https://github.com/mesonbuild/meson/issues/5629
  9. Fixes https://gitlab.freedesktop.org/gstreamer/gst-python/issues/28
  10. Upstream commit: 22f28155d86e27c4134de4ed2861264003fcfd23
  11. Signed-off-by: Sebastian Dröge <sebastian@centricular.com>
  12. Signed-off-by: Adam Duskett <aduskett@gmail.com>
  13. ---
  14. meson.build | 8 ++++++++
  15. 1 file changed, 8 insertions(+)
  16. diff --git a/meson.build b/meson.build
  17. index 744b7ce..492af1a 100644
  18. --- a/meson.build
  19. +++ b/meson.build
  20. @@ -25,6 +25,14 @@ pygobject_dep = dependency('pygobject-3.0', fallback: ['pygobject', 'pygobject_d
  21. pymod = import('python')
  22. python = pymod.find_installation(get_option('python'))
  23. python_dep = python.dependency(required : true)
  24. +pythonver = python.language_version()
  25. +
  26. +# Workaround for https://github.com/mesonbuild/meson/issues/5629
  27. +# https://gitlab.freedesktop.org/gstreamer/gst-python/issues/28
  28. +python_dep = dependency('python-@0@-embed'.format(pythonver), version: '>=3', required: false)
  29. +if not python_dep.found()
  30. + python_dep = python.dependency(required : true)
  31. +endif
  32. python_abi_flags = python.get_variable('ABIFLAGS', '')
  33. pylib_loc = get_option('libpython-dir')
  34. --
  35. 2.24.1