[file-roller] build: Find python for helper script explicitly



commit 4aabcbd494f1f2197c24e4e7b41acd26d319c517
Author: Jan Tojnar <jtojnar gmail com>
Date:   Fri Apr 1 00:30:19 2022 +0200

    build: Find python for helper script explicitly
    
    If Python is not present (e.g. when building in a sandbox),
    Meson will fail in the middle of a build:
    
        /usr/bin/env: ‘python3’: No such file or directory
    
    Let’s check for `python3` using `find_program` so that
    the issue can be detected in the configure step.
    
    It would be even nicer to get rid of the Python script
    in favour of using Meson’s filesystem module to read
    the supported-mime-types file in Meson itself but
    the `fs.read` function will currently trigger full
    Meson re-configuration when a change in the file is detected,
    instead of just invalidation of the affected targets
    like `configure_file` does.

 data/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/data/meson.build b/data/meson.build
index ebfeb290..54adbd86 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -13,7 +13,7 @@ install_data('packages.match',
 desktop_in_file = custom_target('org.gnome.FileRoller.desktop.in',
   input : [ 'supported-mime-types', 'org.gnome.FileRoller.desktop.in.in' ],
   output : 'org.gnome.FileRoller.desktop.in',
-  command : [ find_program('set-mime-type-entry.py'), '@INPUT@' ],
+  command : [ find_program('python3'), files('set-mime-type-entry.py'), '@INPUT@' ],
   capture: true,
   install : false
 )


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