[damned-lies] Improved meson.build interpretation



commit 53bff80d38e309814692bf6c6c676bb86bb96576
Author: Claude Paroz <claude 2xlibre net>
Date:   Tue Aug 15 08:49:42 2017 +0200

    Improved meson.build interpretation

 stats/tests/meson-ui.build |    3 +++
 stats/utils.py             |    4 ++--
 2 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/stats/tests/meson-ui.build b/stats/tests/meson-ui.build
index 9423439..4c634ca 100644
--- a/stats/tests/meson-ui.build
+++ b/stats/tests/meson-ui.build
@@ -1 +1,4 @@
+i18n = import('i18n')
+
 i18n.gettext(gnomebt_gettext_package, preset: 'glib')
+install_data('Makefile.in.in')
diff --git a/stats/utils.py b/stats/utils.py
index a3d6552..f42f483 100644
--- a/stats/utils.py
+++ b/stats/utils.py
@@ -172,7 +172,7 @@ class MesonfileWrapper(MakefileWrapper):
             r'\1=',
             content
         )
-        content = content.replace('true', 'True').replace('false', 'False')
+        content = content.replace('true', 'True').replace('false', 'False').replace("i18n = import('i18n')", 
'')
         return content
 
     def read_variable(self, *variables):
@@ -194,7 +194,7 @@ class MesonfileWrapper(MakefileWrapper):
                         catched[var_name] = kwargs[var_name]
 
         catcher = VarCatcher()
-        meson_locals = {'gnome': catcher, 'i18n': catcher, 'meson': Mock()}
+        meson_locals = {'gnome': catcher, 'i18n': catcher, 'install_data': Mock(), 'meson': Mock()}
         while True:
             try:
                 exec(self.content, {}, meson_locals)


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