From c44b8f3b281a56a99ec8cfd01615b24185c7a9fc Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 16 Mar 2019 13:03:23 +0100 Subject: Set line justification from a constant in the wscript This fixes justification of early checks that happen before configure recursion. --- extras/autowaf.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/extras/autowaf.py b/extras/autowaf.py index b241d8f..4b013c8 100644 --- a/extras/autowaf.py +++ b/extras/autowaf.py @@ -14,9 +14,6 @@ g_is_child = False global g_step g_step = 0 -global line_just -line_just = 40 - if sys.platform == 'win32': lib_path_name = 'PATH' elif sys.platform == 'darwin': @@ -100,6 +97,10 @@ class ConfigureContext(Configure.ConfigurationContext): """configures the project""" def __init__(self, **kwargs): + self.line_just = 45 + if hasattr(Context.g_module, 'line_just'): + self.line_just = Context.g_module.line_just + super(ConfigureContext, self).__init__(**kwargs) self.run_env = ConfigSet.ConfigSet() @@ -490,11 +491,6 @@ def set_lib_env(conf, name, version): conf.run_env.append_unique(lib_path_name, lib_path) conf.define(NAME + '_VERSION', version) -def set_line_just(conf, width): - global line_just - line_just = max(line_just, width) - conf.line_just = line_just - def display_header(title): global g_is_child if g_is_child: -- cgit v1.2.1