aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build.py2
-rwxr-xr-xcommandrunner.py2
-rw-r--r--compilers.py29
-rw-r--r--coredata.py2
-rw-r--r--environment.py5
-rwxr-xr-xinstall_meson.py4
-rw-r--r--interpreter.py23
-rwxr-xr-xmeson_install.py7
-rwxr-xr-xmeson_test.py4
-rwxr-xr-xmesonconf.py2
-rwxr-xr-xmesonintrospect.py10
-rw-r--r--ninjabackend.py5
-rw-r--r--optinterpreter.py4
-rwxr-xr-xrun_tests.py4
-rwxr-xr-xsymbolextractor.py2
-rw-r--r--vs2010backend.py8
16 files changed, 56 insertions, 57 deletions
diff --git a/build.py b/build.py
index 29f20a8..077abce 100644
--- a/build.py
+++ b/build.py
@@ -39,7 +39,7 @@ known_basic_kwargs = {'install' : True,
'sources' : True,
'objects' : True,
'native' : True,
- }
+ }
known_shlib_kwargs = known_basic_kwargs.copy()
known_shlib_kwargs.update({'version' : True,
diff --git a/commandrunner.py b/commandrunner.py
index 8530bb4..1d5defb 100755
--- a/commandrunner.py
+++ b/commandrunner.py
@@ -23,7 +23,7 @@ def run_command(source_dir, build_dir, subdir, command, arguments):
env = {'MESON_SOURCE_ROOT' : source_dir,
'MESON_BUILD_ROOT' : build_dir,
'MESON_SUBDIR' : subdir
- }
+ }
cwd = os.path.join(source_dir, subdir)
child_env = os.environ.copy()
child_env.update(env)
diff --git a/compilers.py b/compilers.py
index 0f91d9a..160d9e5 100644
--- a/compilers.py
+++ b/compilers.py
@@ -47,15 +47,14 @@ def is_object(fname):
return suffix in obj_suffixes
gnulike_buildtype_args = {'plain' : [],
- 'debug' : ['-g'],
- 'debugoptimized' : ['-O2', '-g'],
- 'release' : ['-O3'],
- }
+ 'debug' : ['-g'],
+ 'debugoptimized' : ['-O2', '-g'],
+ 'release' : ['-O3']}
msvc_buildtype_args = {'plain' : [],
- 'debug' : ["/MDd", "/Zi", "/Ob0", "/Od", "/RTC1"],
- 'debugoptimized' : ["/MD", "/Zi", "/O2", "/Ob1", "/D"],
- 'release' : ["/MD", "/O2", "/Ob2"]}
+ 'debug' : ["/MDd", "/Zi", "/Ob0", "/Od", "/RTC1"],
+ 'debugoptimized' : ["/MD", "/Zi", "/O2", "/Ob1", "/D"],
+ 'release' : ["/MD", "/O2", "/Ob2"]}
gnulike_buildtype_linker_args = {}
@@ -64,18 +63,18 @@ if mesonlib.is_osx():
'debug' : [],
'debugoptimized' : [],
'release' : [],
- })
+ })
else:
gnulike_buildtype_linker_args.update({'plain' : [],
'debug' : [],
'debugoptimized' : [],
'release' : ['-Wl,-O1'],
- })
+ })
msvc_buildtype_linker_args = {'plain' : [],
- 'debug' : [],
- 'debugoptimized' : [],
- 'release' : []}
+ 'debug' : [],
+ 'debugoptimized' : [],
+ 'release' : []}
java_buildtype_args = {'plain' : [],
'debug' : ['-g'],
@@ -83,9 +82,9 @@ java_buildtype_args = {'plain' : [],
'release' : []}
rust_buildtype_args = {'plain' : [],
- 'debug' : ['-g'],
- 'debugoptimized' : ['-g', '--opt-level', '2'],
- 'release' : ['--opt-level', '3']}
+ 'debug' : ['-g'],
+ 'debugoptimized' : ['-g', '--opt-level', '2'],
+ 'release' : ['--opt-level', '3']}
mono_buildtype_args = {'plain' : [],
'debug' : ['-debug'],
diff --git a/coredata.py b/coredata.py
index 59702f7..4590550 100644
--- a/coredata.py
+++ b/coredata.py
@@ -110,7 +110,7 @@ forbidden_target_names = {'clean': None,
'test-valgrind': None,
'install': None,
'build.ninja': None,
- }
+ }
class MesonException(Exception):
def __init__(self, *args, **kwargs):
diff --git a/environment.py b/environment.py
index b58af2a..905f200 100644
--- a/environment.py
+++ b/environment.py
@@ -215,8 +215,9 @@ class Environment():
for compiler in compilers:
for arg in ['--version', '-V']:
try:
- p = subprocess.Popen([compiler] + [arg], stdout=subprocess.PIPE,
- stderr=subprocess.PIPE)
+ p = subprocess.Popen([compiler] + [arg],
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE)
except OSError:
continue
(out, err) = p.communicate()
diff --git a/install_meson.py b/install_meson.py
index 672576b..b337726 100755
--- a/install_meson.py
+++ b/install_meson.py
@@ -24,9 +24,9 @@ import argparse
parser = argparse.ArgumentParser()
parser.add_argument('--prefix', default='/usr/local', dest='prefix',
- help='the installation prefix (default: %(default)s)')
+ help='the installation prefix (default: %(default)s)')
parser.add_argument('--destdir', default='', dest='destdir',
- help='the destdir (default: %(default)s)')
+ help='the destdir (default: %(default)s)')
options = parser.parse_args()
if options.prefix[0] != '/':
diff --git a/interpreter.py b/interpreter.py
index 63e299e..863b23b 100644
--- a/interpreter.py
+++ b/interpreter.py
@@ -93,7 +93,7 @@ class TryRunResultHolder(InterpreterObject):
'compiled' : self.compiled_method,
'stdout' : self.stdout_method,
'stderr' : self.stderr_method,
- })
+ })
def returncode_method(self, args, kwargs):
return self.res.returncode
@@ -119,7 +119,7 @@ class RunProcess(InterpreterObject):
self.methods.update({'returncode' : self.returncode_method,
'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]
@@ -174,7 +174,7 @@ class ConfigurationDataHolder(InterpreterObject):
self.held_object = build.ConfigurationData()
self.methods.update({'set': self.set_method,
'set10': self.set10_method,
- })
+ })
def is_used(self):
return self.used
@@ -306,7 +306,7 @@ class Build(InterpreterObject):
def __init__(self):
InterpreterObject.__init__(self)
self.methods.update({'name' : self.get_name_method,
- })
+ })
def get_name_method(self, args, kwargs):
return platform.system().lower()
@@ -319,7 +319,7 @@ class Host(InterpreterObject):
self.environment = envir
self.methods.update({'name' : self.get_name_method,
'is_big_endian' : self.is_big_endian_method,
- })
+ })
def get_name_method(self, args, kwargs):
if self.environment.is_cross_build():
@@ -494,9 +494,8 @@ class SubprojectHolder(InterpreterObject):
def __init__(self, subinterpreter):
super().__init__()
self.subinterpreter = subinterpreter
- self.methods.update({
- 'get_variable' : self.get_variable_method,
- })
+ self.methods.update({'get_variable' : self.get_variable_method,
+ })
def get_variable_method(self, args, kwargs):
if len(args) != 1:
@@ -522,7 +521,7 @@ class CompilerHolder(InterpreterObject):
'alignment' : self.alignment_method,
'version' : self.version_method,
'cmd_array' : self.cmd_array_method,
- })
+ })
def version_method(self, args, kwargs):
return self.compiler.version
@@ -670,7 +669,7 @@ class ModuleHolder(InterpreterObject):
raise InvalidArguments('Module %s does not have method %s.' % (self.modname, method_name))
state = ModuleState()
state.build_to_src = os.path.relpath(self.interpreter.environment.get_source_dir(),
- self.interpreter.environment.get_build_dir())
+ self.interpreter.environment.get_build_dir())
state.subdir = self.interpreter.subdir
state.environment = self.interpreter.environment
state.project_name = self.interpreter.build.project_name
@@ -698,7 +697,7 @@ class MesonMain(InterpreterObject):
'source_root' : self.source_root_method,
'build_root' : self.build_root_method,
'set_install_script' : self.set_install_script_method,
- })
+ })
def set_install_script_method(self, args, kwargs):
if len(args) != 1:
@@ -844,7 +843,7 @@ class Interpreter():
'import' : self.func_import,
'files' : self.func_files,
'declare_dependency': self.func_declare_dependency,
- }
+ }
def module_method_callback(self, invalues):
unwrap_single = False
diff --git a/meson_install.py b/meson_install.py
index aaf07c1..5643298 100755
--- a/meson_install.py
+++ b/meson_install.py
@@ -124,7 +124,7 @@ def run_install_script(d):
env = {'MESON_SOURCE_ROOT' : d.source_dir,
'MESON_BUILD_ROOT' : d.build_dir,
'MESON_INSTALL_PREFIX' : d.prefix
- }
+ }
script = d.install_script
print('Running custom install script %s' % script)
suffix = os.path.splitext(script)[1].lower()
@@ -206,8 +206,9 @@ def install_targets(d):
print("Symlink creation does not work on this platform.")
printed_symlink_error = True
if is_elf_platform():
- p = subprocess.Popen([d.depfixer, outname, install_rpath], stdout=subprocess.PIPE,
- stderr=subprocess.PIPE)
+ p = subprocess.Popen([d.depfixer, outname, install_rpath],
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE)
(stdo, stde) = p.communicate()
if p.returncode != 0:
print('Could not fix dependency info.\n')
diff --git a/meson_test.py b/meson_test.py
index 47f3b8b..452ce74 100755
--- a/meson_test.py
+++ b/meson_test.py
@@ -23,9 +23,9 @@ tests_failed = False
parser = argparse.ArgumentParser()
parser.add_argument('--wrapper', default=None, dest='wrapper',
- help='wrapper to run tests with (e.g. valgrind)')
+ help='wrapper to run tests with (e.g. valgrind)')
parser.add_argument('--wd', default=None, dest='wd',
- help='directory to cd into before running')
+ help='directory to cd into before running')
parser.add_argument('args', nargs='+')
diff --git a/mesonconf.py b/mesonconf.py
index 23ecee4..eeedc2b 100755
--- a/mesonconf.py
+++ b/mesonconf.py
@@ -23,7 +23,7 @@ from meson import build_types
parser = argparse.ArgumentParser()
parser.add_argument('-D', action='append', default=[], dest='sets',
- help='Set an option to the given value.')
+ help='Set an option to the given value.')
parser.add_argument('directory', nargs='*')
class ConfException(Exception):
diff --git a/mesonintrospect.py b/mesonintrospect.py
index 4903c5e..5ddc7f5 100755
--- a/mesonintrospect.py
+++ b/mesonintrospect.py
@@ -28,15 +28,15 @@ import sys, os
parser = argparse.ArgumentParser()
parser.add_argument('--targets', action='store_true', dest='list_targets', default=False,
- help='List top level targets.')
+ help='List top level targets.')
parser.add_argument('--target-files', action='store', dest='target_files', default=None,
- help='List source files for a given target.')
+ help='List source files for a given target.')
parser.add_argument('--buildsystem-files', action='store_true', dest='buildsystem_files', default=False,
- help='List files that make up the build system.')
+ help='List files that make up the build system.')
parser.add_argument('--buildoptions', action='store_true', dest='buildoptions', default=False,
- help='List all build options.')
+ help='List all build options.')
parser.add_argument('--tests', action='store_true', dest='tests', default=False,
- help='List all unit tests.')
+ help='List all unit tests.')
parser.add_argument('args', nargs='+')
def list_targets(coredata, builddata):
diff --git a/ninjabackend.py b/ninjabackend.py
index 14feb3f..34f6b18 100644
--- a/ninjabackend.py
+++ b/ninjabackend.py
@@ -643,8 +643,7 @@ class NinjaBackend(backends.Backend):
rel_src = src.rel_to_builddir(self.build_to_src)
plain_class_path = src.fname[:-4] + 'class'
rel_obj = os.path.join(self.get_target_private_dir(target), plain_class_path)
- element = NinjaBuildElement(rel_obj,
- compiler.get_language() + '_COMPILER', rel_src)
+ element = NinjaBuildElement(rel_obj, compiler.get_language() + '_COMPILER', rel_src)
element.add_item('ARGS', args)
element.write(outfile)
return plain_class_path
@@ -772,7 +771,7 @@ class NinjaBackend(backends.Backend):
rule = 'rule STATIC%s_LINKER\n' % crstr
command = ' command = %s $LINK_ARGS %s $in\n' % \
(' '.join(static_linker.get_exelist()),
- ' '.join(static_linker.get_output_args('$out')))
+ ' '.join(static_linker.get_output_args('$out')))
description = ' description = Static linking library $out\n\n'
outfile.write(rule)
outfile.write(command)
diff --git a/optinterpreter.py b/optinterpreter.py
index fa6a0f5..312427e 100644
--- a/optinterpreter.py
+++ b/optinterpreter.py
@@ -29,7 +29,7 @@ forbidden_option_names = {'buildtype': True,
'mandir' : True,
'localedir' : True,
'werror' : True,
- }
+ }
class OptionException(coredata.MesonException):
pass
@@ -93,7 +93,7 @@ class UserComboOption(UserOption):
option_types = {'string' : UserStringOption,
'boolean' : UserBooleanOption,
'combo' : UserComboOption,
- }
+ }
class OptionInterpreter:
def __init__(self, subproject, command_line_options):
diff --git a/run_tests.py b/run_tests.py
index 2e95689..673c55b 100755
--- a/run_tests.py
+++ b/run_tests.py
@@ -222,7 +222,7 @@ def run_test(testdir, should_succeed):
env = os.environ.copy()
env['DESTDIR'] = install_dir
pi = subprocess.Popen(install_commands, cwd=test_build_dir, env=env,
- stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+ stdout=subprocess.PIPE, stderr=subprocess.PIPE)
(o, e) = pi.communicate()
stdo += o.decode('utf-8')
stde += e.decode('utf-8')
@@ -352,7 +352,7 @@ def generate_prebuilt_object():
if __name__ == '__main__':
parser = argparse.ArgumentParser(description="Run the test suite of Meson.")
parser.add_argument('--backend', default=None, dest='backend',
- choices = backendlist)
+ choices = backendlist)
options = parser.parse_args()
setup_commands(options.backend)
diff --git a/symbolextractor.py b/symbolextractor.py
index 2f80fdc..b184cff 100755
--- a/symbolextractor.py
+++ b/symbolextractor.py
@@ -28,7 +28,7 @@ import argparse
parser = argparse.ArgumentParser()
parser.add_argument('--cross-host', default=None, dest='cross_host',
- help='cross compilation host platform')
+ help='cross compilation host platform')
parser.add_argument('args', nargs='+')
def dummy_syms(outfilename):
diff --git a/vs2010backend.py b/vs2010backend.py
index d7064c8..268615b 100644
--- a/vs2010backend.py
+++ b/vs2010backend.py
@@ -177,8 +177,8 @@ class Vs2010Backend(backends.Backend):
else:
raise MesonException('Unknown target type for %s' % target_name)
root = ET.Element('Project', {'DefaultTargets' : "Build",
- 'ToolsVersion' : '4.0',
- 'xmlns' : 'http://schemas.microsoft.com/developer/msbuild/2003'})
+ 'ToolsVersion' : '4.0',
+ 'xmlns' : 'http://schemas.microsoft.com/developer/msbuild/2003'})
confitems = ET.SubElement(root, 'ItemGroup', {'Label' : 'ProjectConfigurations'})
prjconf = ET.SubElement(confitems, 'ProjectConfiguration', {'Include' : 'Debug|Win32'})
p = ET.SubElement(prjconf, 'Configuration')
@@ -322,8 +322,8 @@ class Vs2010Backend(backends.Backend):
platform = "Win32"
project_name = target_name
root = ET.Element('Project', {'DefaultTargets' : "Build",
- 'ToolsVersion' : '4.0',
- 'xmlns' : 'http://schemas.microsoft.com/developer/msbuild/2003'})
+ 'ToolsVersion' : '4.0',
+ 'xmlns' : 'http://schemas.microsoft.com/developer/msbuild/2003'})
confitems = ET.SubElement(root, 'ItemGroup', {'Label' : 'ProjectConfigurations'})
prjconf = ET.SubElement(confitems, 'ProjectConfiguration', {'Include' : 'Debug|Win32'})
p = ET.SubElement(prjconf, 'Configuration')