[gtkmm] meson.build: Compress the Python code for is_git_build



commit 7c894899e020bb088844cff97ff2893fdd3a32bc
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date:   Tue Sep 27 08:16:44 2022 +0200

    meson.build: Compress the Python code for is_git_build

 meson.build | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
---
diff --git a/meson.build b/meson.build
index 6330e403..0da5e335 100644
--- a/meson.build
+++ b/meson.build
@@ -58,17 +58,11 @@ endif
 # Do we build from a git repository?
 # Suppose we do if and only if the meson.build file is tracked by git.
 cmd_py = '''
-import os
-import sys
-import subprocess
-import shutil
-
+import shutil, subprocess, sys
 if not shutil.which('git'):
   sys.exit(1)
-
 cmd = [ 'git', 'ls-files', '--error-unmatch', 'meson.build' ]
 sys.exit(subprocess.run(cmd, cwd="@0@", stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL).returncode)
-
 '''.format(project_source_root)
 is_git_build = run_command(python3, '-c', cmd_py, check: false).returncode() == 0
 


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