[glade/glade-3-36.msvc: 4/18] meson.build: Fix building on Python < 3.8 and Windows



commit 93a8356fc538af64b1e0b822b3ecab35225b9aa8
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Mon Jun 8 17:32:26 2020 +0800

    meson.build: Fix building on Python < 3.8 and Windows
    
    The python-3.8-embed dependency is only provided on non-Windows versions
    of Python 3.8 and later, so don't try to look for this on Windows nor
    pre-3.8 Python.

 meson.build | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/meson.build b/meson.build
index 7dcacb93..b1545344 100644
--- a/meson.build
+++ b/meson.build
@@ -137,7 +137,12 @@ pygobject_version = '3.8.0'
 pygobject_dep = dependency('pygobject-3.0', version: '>= ' + pygobject_version, required: 
get_option('python'))
 have_python = pygobject_dep.found()
 if have_python
-  python_dep = dependency('python-3.8-embed', version: '>= 3.8')
+  python_core_dep = import('python').find_installation().dependency()
+  if python_core_dep.version() >= '3.8' and glade_system != 'windows'
+    python_dep = dependency('python-3.8-embed', version: '>= 3.8')
+  else
+    python_dep = python_core_dep
+  endif
 
   version_array = pygobject_version.split('.')
   config_h.set('PYGOBJECT_REQUIRED_MAJOR', version_array[0].to_int())


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]