summary refs log tree commit diff stats
path: root/plugins
diff options
context:
space:
mode:
authorPatrick Griffis <tingping@tingping.se>2020-03-11 11:07:56 -0700
committerPatrick Griffis <tingping@tingping.se>2020-03-11 11:08:28 -0700
commit5deb69591992d4fede9090b60d3dc847612a4d60 (patch)
tree2850c111a4d25fb949e0ad09dcb9eac1a9061ccf /plugins
parentbcff9a2ad8a14335480a0e231e8dbbe71d36b7c6 (diff)
build: Better support building against python 3.8+
Closes #2441
Diffstat (limited to 'plugins')
-rw-r--r--plugins/python/meson.build8
1 files changed, 7 insertions, 1 deletions
diff --git a/plugins/python/meson.build b/plugins/python/meson.build
index 2ad5128e..eb762134 100644
--- a/plugins/python/meson.build
+++ b/plugins/python/meson.build
@@ -1,6 +1,12 @@
 python_opt = get_option('with-python')
 if python_opt.startswith('python3')
-  python_dep = dependency(python_opt, version: '>= 3.3')
+  # Python 3.8 introduced a new -embed variant
+  if not python_opt.endswith('-embed')
+    python_dep = dependency(python_opt + '-embed', version: '>= 3.3', required: false)
+  endif
+  if not python_dep.found()
+    python_dep = dependency(python_opt, version: '>= 3.3')
+  endif
 else
   python_dep = dependency(python_opt, version: '>= 2.7')
 endif