]> jfr.im git - irc/hexchat/hexchat.git/commitdiff
build: Better support building against python 3.8+
authorPatrick Griffis <redacted>
Wed, 11 Mar 2020 18:07:56 +0000 (11:07 -0700)
committerPatrick Griffis <redacted>
Wed, 11 Mar 2020 18:08:28 +0000 (11:08 -0700)
Closes #2441

plugins/python/meson.build

index 2ad5128e5c678268432ea8ca856d1155ca96c8d9..eb762134ae3a9a81caf7e8850dcd9867ae94c0c7 100644 (file)
@@ -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