diff options
-rw-r--r-- | build.py | 4 | ||||
-rw-r--r-- | dependencies.py | 8 | ||||
-rwxr-xr-x | depfixer.py | 2 | ||||
-rw-r--r-- | environment.py | 8 | ||||
-rw-r--r-- | interpreter.py | 40 | ||||
-rwxr-xr-x | meson.py | 2 | ||||
-rwxr-xr-x | meson_test.py | 2 | ||||
-rwxr-xr-x | mesongui.py | 10 | ||||
-rw-r--r-- | mlog.py | 4 | ||||
-rw-r--r-- | mparser.py | 4 | ||||
-rw-r--r-- | ninjabackend.py | 4 |
11 files changed, 44 insertions, 44 deletions
@@ -466,7 +466,7 @@ class Generator(): if not isinstance(a, str): raise InvalidArguments('A non-string object in "arguments" keyword argument.') self.arglist = args - + if 'output' not in kwargs: raise InvalidArguments('Generator must have "output" keyword argument.') outputs = kwargs['output'] @@ -749,7 +749,7 @@ class ConfigureFile(): def get_sources(self): return self.sources - + def get_subdir(self): return self.subdir diff --git a/dependencies.py b/dependencies.py index 1f9f0d2..cb8c976 100644 --- a/dependencies.py +++ b/dependencies.py @@ -388,7 +388,7 @@ class GMockDependency(Dependency): else: self.sources = [self.all_src] mlog.log('Dependency GMock found:', mlog.green('YES'), '(building self)') - + else: mlog.log('Dependency GMock found:', mlog.red('NO')) self.is_found = False @@ -611,12 +611,12 @@ why. As a hack filter out everything that is not a flag.""" def found(self): return self.args is not None - + def get_compile_args(self): if self.args is None: return [] return self.args - + def get_link_args(self): return self.libs @@ -629,7 +629,7 @@ class AppleFrameworks(Dependency): if len(modules) == 0: raise DependencyException("AppleFrameworks dependency requires at least one module.") self.frameworks = modules - + def get_link_args(self): args = [] for f in self.frameworks: diff --git a/depfixer.py b/depfixer.py index 3cccfd0..69df8e5 100755 --- a/depfixer.py +++ b/depfixer.py @@ -105,7 +105,7 @@ class Elf(): self.parse_header() self.parse_sections() self.parse_dynamic() - + def detect_elf_type(self): data = self.bf.read(5) if data[1:4] != b'ELF': diff --git a/environment.py b/environment.py index 7072005..fd68da4 100644 --- a/environment.py +++ b/environment.py @@ -1290,7 +1290,7 @@ def find_coverage_tools(): gcovr_exe = 'gcovr' lcov_exe = 'lcov' genhtml_exe = 'genhtml' - + if not exe_exists([gcovr_exe, '--version']): gcovr_exe = None if not exe_exists([lcov_exe, '--version']): @@ -1423,7 +1423,7 @@ class Environment(): def get_script_dir(self): return os.path.dirname(self.meson_script_file) - + def get_log_dir(self): return self.log_dir @@ -1470,7 +1470,7 @@ class Environment(): exe_wrap = None for compiler in compilers: try: - basename = os.path.basename(compiler).lower() + basename = os.path.basename(compiler).lower() if basename == 'cl' or basename == 'cl.exe': arg = '/?' else: @@ -1563,7 +1563,7 @@ class Environment(): is_cross = False exe_wrap = None for compiler in compilers: - basename = os.path.basename(compiler).lower() + basename = os.path.basename(compiler).lower() if basename == 'cl' or basename == 'cl.exe': arg = '/?' else: diff --git a/interpreter.py b/interpreter.py index d226d86..9e789a4 100644 --- a/interpreter.py +++ b/interpreter.py @@ -48,13 +48,13 @@ class TryRunResultHolder(InterpreterObject): 'stdout' : self.stdout_method, 'stderr' : self.stderr_method, }) - + def returncode_method(self, args, kwargs): return self.res.returncode def compiled_method(self, args, kwargs): return self.res.compiled - + def stdout_method(self, args, kwargs): return self.res.stdout @@ -74,7 +74,7 @@ class RunProcess(InterpreterObject): 'stdout' : self.stdout_method, 'stderr' : self.stderr_method, }) - + def run_command(self, command_array, source_dir, build_dir, subdir, in_builddir): cmd_name = command_array[0] env = {'MESON_SOURCE_ROOT' : source_dir, @@ -202,13 +202,13 @@ class ExternalLibraryHolder(InterpreterObject): def get_name(self): return self.el.name - + def get_compile_args(self): return self.el.get_compile_args() - + def get_link_args(self): return self.el.get_link_args() - + def get_exe_args(self): return self.el.get_exe_args() @@ -264,7 +264,7 @@ class Host(InterpreterObject): if self.environment.is_cross_build(): return self.environment.cross_info.get('name') return platform.system().lower() - + def is_big_endian_method(self, args, kwargs): return sys.byteorder != 'little' @@ -289,7 +289,7 @@ class Headers(InterpreterObject): def get_subdir(self): return self.subdir - + def get_sources(self): return self.sources @@ -399,10 +399,10 @@ class Test(InterpreterObject): self.is_parallel = is_parallel self.cmd_args = cmd_args self.env = env - + def get_exe(self): return self.exe - + def get_name(self): return self.name @@ -492,7 +492,7 @@ class CompilerHolder(InterpreterObject): hadtxt = mlog.green('YES') else: hadtxt = mlog.red('NO') - mlog.log('Checking whether type "', mlog.bold(typename), + mlog.log('Checking whether type "', mlog.bold(typename), '" has member "', mlog.bold(membername), '": ', hadtxt, sep='') return had @@ -578,7 +578,7 @@ class MesonMain(InterpreterObject): scriptbase = args[0] if not isinstance(scriptbase, str): raise InterpreterException('Set_install_script argument is not a string.') - scriptfile = os.path.join(self.interpreter.environment.source_dir, + scriptfile = os.path.join(self.interpreter.environment.source_dir, self.interpreter.subdir, scriptbase) if not os.path.isfile(scriptfile): raise InterpreterException('Can not find install script %s.' % scriptbase) @@ -672,7 +672,7 @@ class Interpreter(): self.subproject_stack = [] def build_func_dict(self): - self.funcs = {'project' : self.func_project, + self.funcs = {'project' : self.func_project, 'message' : self.func_message, 'error' : self.func_error, 'executable': self.func_executable, @@ -796,7 +796,7 @@ class Interpreter(): if wanted != None: if not isinstance(actual, wanted): raise InvalidArguments('Incorrect argument type.') - + def func_run_command(self, node, args, kwargs): if len(args) < 1: raise InterpreterException('Not enough arguments') @@ -1142,7 +1142,7 @@ class Interpreter(): h = Headers(args, kwargs) self.build.headers.append(h) return h - + def func_man(self, node, args, kwargs): for a in args: if not isinstance(a, str): @@ -1150,7 +1150,7 @@ class Interpreter(): m = Man(args, kwargs) self.build.man.append(m) return m - + def func_subdir(self, node, args, kwargs): if len(kwargs) > 0: raise InvalidArguments('subdir command takes no keyword arguments.') @@ -1194,7 +1194,7 @@ class Interpreter(): data = Data(args[0], args[1:], kwargs) self.build.data.append(data) return data - + def func_configure_file(self, node, args, kwargs): if len(args) > 0: raise InterpreterException("configure_file takes only keyword arguments.") @@ -1330,7 +1330,7 @@ class Interpreter(): isinstance(value, list): return True return False - + def assignment(self, node): assert(isinstance(node, mparser.AssignmentNode)) var_name = node.var_name @@ -1434,7 +1434,7 @@ class Interpreter(): raise InvalidArguments('Variable "%s" is not callable.' % object_name) (args, kwargs) = self.reduce_arguments(args) return obj.method_call(method_name, args, kwargs) - + def evaluate_if(self, node): assert(isinstance(node, mparser.IfClauseNode)) for i in node.ifs: @@ -1503,7 +1503,7 @@ class Interpreter(): if not isinstance(r, bool): raise InterpreterException('Second argument to "or" is not a boolean.') return r - + def evaluate_notstatement(self, cur): v = self.evaluate_statement(cur.value) if isinstance(v, mparser.BooleanNode): @@ -81,7 +81,7 @@ class MesonApp(): raise RuntimeError('--prefix must be an absolute path.') self.meson_script_file = script_file self.options = options - + def has_build_file(self, dirname): fname = os.path.join(dirname, environment.build_filename) return os.path.exists(fname) diff --git a/meson_test.py b/meson_test.py index 8fec226..c987da8 100755 --- a/meson_test.py +++ b/meson_test.py @@ -57,7 +57,7 @@ def run_single_test(wrap, test): else: if test.is_cross: if test.exe_runner is None: - # Can not run test on cross compiled executable + # Can not run test on cross compiled executable # because there is no execute wrapper. cmd = None else: diff --git a/mesongui.py b/mesongui.py index fb45231..60dd455 100755 --- a/mesongui.py +++ b/mesongui.py @@ -18,7 +18,7 @@ import sys, os, pickle, time, shutil import build, coredata, environment, optinterpreter from PyQt5 import uic from PyQt5.QtWidgets import QApplication, QMainWindow, QHeaderView -from PyQt5.QtWidgets import QComboBox, QCheckBox +from PyQt5.QtWidgets import QComboBox, QCheckBox from PyQt5.QtCore import QAbstractItemModel, QModelIndex, QVariant, QTimer import PyQt5.QtCore import PyQt5.QtWidgets @@ -45,7 +45,7 @@ class PathModel(QAbstractItemModel): if index.isValid(): return 0 return len(self.names) - + def columnCount(self, index): return 2 @@ -111,7 +111,7 @@ class TargetModel(QAbstractItemModel): if index.isValid(): return 0 return len(self.targets) - + def columnCount(self, index): return 4 @@ -164,7 +164,7 @@ class DependencyModel(QAbstractItemModel): if index.isValid(): return 0 return len(self.deps) - + def columnCount(self, index): return 4 @@ -471,7 +471,7 @@ class MesonGui(): def clean(self, foo): self.run_process(['clean']) - + def save(self, foo): pickle.dump(self.coredata, open(self.coredata_file, 'wb')) @@ -29,11 +29,11 @@ def initialize(logdir): class AnsiDecorator(): plain_code = "\033[0m" - + def __init__(self, text, code): self.text = text self.code = code - + def get_text(self, with_codes): if with_codes: return self.code + self.text + AnsiDecorator.plain_code @@ -30,7 +30,7 @@ class Token: self.lineno = lineno self.colno = colno self.value = value - + def __eq__(self, other): if isinstance(other, str): return self.tid == other @@ -273,7 +273,7 @@ class ArgumentNode(): # comparison, plus and multiplication would go here # 5 negation # 6 funcall, method call -# 7 parentheses +# 7 parentheses # 8 plain token class Parser: diff --git a/ninjabackend.py b/ninjabackend.py index ce99693..28a4f97 100644 --- a/ninjabackend.py +++ b/ninjabackend.py @@ -404,7 +404,7 @@ class NinjaBackend(backends.Backend): def generate_custom_install_script(self, d): d.install_script = self.build.install_script - + def generate_header_install(self, d): incroot = self.environment.get_includedir() @@ -824,7 +824,7 @@ class NinjaBackend(backends.Backend): invoc) description = ' description = Compiling Rust source $in.\n' depfile = ' depfile = $out.d\n' - + depstyle = ' deps = gcc\n' outfile.write(rule) outfile.write(command) |