[gobject-introspection/meson-python-abort-on-missing-dep] meson: abort the build if the correct Python dependency isn't found



commit 6491a115c42cad334213a162039dd69197601691
Author: Christoph Reiter <reiter christoph gmail com>
Date:   Fri Jul 26 19:51:53 2019 +0200

    meson: abort the build if the correct Python dependency isn't found
    
    For some reason there is no way to pass required to external meson deps.
    Check manually instead.
    
    See #297

 giscanner/meson.build | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/giscanner/meson.build b/giscanner/meson.build
index 67c043d0..9930728e 100644
--- a/giscanner/meson.build
+++ b/giscanner/meson.build
@@ -108,6 +108,11 @@ else
   python_ext_dep = python.dependency().partial_dependency(compile_args: true)
 endif
 
+if not python_ext_dep.found()
+  # For example if Python is 32bit but we require a 64bit variant
+  error('Python installation not useable')
+endif
+
 giscanner_pymod = python.extension_module('_giscanner', ['giscannermodule.c'],
   link_with: giscanner_lib,
   c_args: gi_hidden_visibility_cflags + custom_c_args,


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