[gtk-doc] build: fix a new meson warning



commit 0bdc5b9e6c922b6dd4eede1a0cfaf413833b11ff
Author: Sébastien Wilmet <swilmet informatique-libre be>
Date:   Fri Jul 29 19:53:23 2022 +0200

    build: fix a new meson warning
    
    With Meson 0.62, I get this warning:
    
    ```
    Program python3 found: YES (/usr/bin/python3)
    WARNING: You should add the boolean check kwarg to the run_command call.
             It currently defaults to false,
             but it will default to true in future releases of meson.
             See also: https://github.com/mesonbuild/meson/issues/9300
    ```
    
    Here we print a custom error() message, so don't fail directly if the
    returncode is non-zero.

 meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/meson.build b/meson.build
index 5d03db6..dc13573 100644
--- a/meson.build
+++ b/meson.build
@@ -41,7 +41,7 @@ python3_required_modules = ['pygments']
 foreach p : python3_required_modules
   # Source: https://docs.python.org/3/library/importlib.html#checking-if-a-module-can-be-imported
   script = 'import importlib.util; import sys; exit(1) if importlib.util.find_spec(\''+ p +'\') is None else 
exit(0)'
-  if run_command(python3, '-c', script).returncode() != 0
+  if run_command(python3, '-c', script, check: false).returncode() != 0
     error('Required Python3 module \'' + p + '\' not found')
   endif
 endforeach


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