aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mesonbuild/backend/ninjabackend.py10
-rw-r--r--mesonbuild/backend/vs2010backend.py12
-rw-r--r--mesonbuild/build.py10
-rw-r--r--mesonbuild/coredata.py2
-rw-r--r--mesonbuild/environment.py9
-rw-r--r--mesonbuild/interpreter.py10
-rw-r--r--mesonbuild/mconf.py6
-rw-r--r--mesonbuild/modules/gnome.py23
-rw-r--r--mesonbuild/scripts/gtkdochelper.py4
-rw-r--r--mesonbuild/wrap/wrap.py2
-rwxr-xr-xmesontest.py4
-rwxr-xr-xrun_project_tests.py2
12 files changed, 49 insertions, 45 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
index f77013b..4be6641 100644
--- a/mesonbuild/backend/ninjabackend.py
+++ b/mesonbuild/backend/ninjabackend.py
@@ -484,11 +484,11 @@ int dummy;
# a serialized executable wrapper for that and check if the
# CustomTarget command needs extra paths first.
if target.capture or (mesonlib.is_windows() and
- self.determine_windows_extra_paths(target.command[0])):
+ self.determine_windows_extra_paths(target.command[0])):
exe_data = self.serialise_executable(target.command[0], cmd[1:],
- # All targets are built from the build dir
- self.environment.get_build_dir(),
- capture=ofilenames[0] if target.capture else None)
+ # All targets are built from the build dir
+ self.environment.get_build_dir(),
+ capture=ofilenames[0] if target.capture else None)
cmd = [sys.executable, self.environment.get_build_command(),
'--internal', 'exe', exe_data]
cmd_type = 'meson_exe.py custom'
@@ -1200,7 +1200,7 @@ int dummy;
elem.write(outfile)
if isinstance(target, build.StaticLibrary):
elem = self.generate_link(target, outfile, self.get_target_filename(target),
- rel_objects, self.build.static_linker)
+ rel_objects, self.build.static_linker)
elem.write(outfile)
elif isinstance(target, build.Executable):
elem = NinjaBuildElement(self.all_outputs, self.get_target_filename(target), 'swift_COMPILER', [])
diff --git a/mesonbuild/backend/vs2010backend.py b/mesonbuild/backend/vs2010backend.py
index 8bfc2e4..e9d7389 100644
--- a/mesonbuild/backend/vs2010backend.py
+++ b/mesonbuild/backend/vs2010backend.py
@@ -462,18 +462,18 @@ class Vs2010Backend(backends.Backend):
def escape_preprocessor_define(define):
# See: https://msdn.microsoft.com/en-us/library/bb383819.aspx
table = str.maketrans({'%': '%25', '$': '%24', '@': '%40',
- "'": '%27', ';': '%3B', '?': '%3F', '*': '%2A',
- # We need to escape backslash because it'll be un-escaped by
- # Windows during process creation when it parses the arguments
- # Basically, this converts `\` to `\\`.
- '\\': '\\\\'})
+ "'": '%27', ';': '%3B', '?': '%3F', '*': '%2A',
+ # We need to escape backslash because it'll be un-escaped by
+ # Windows during process creation when it parses the arguments
+ # Basically, this converts `\` to `\\`.
+ '\\': '\\\\'})
return define.translate(table)
@staticmethod
def escape_additional_option(option):
# See: https://msdn.microsoft.com/en-us/library/bb383819.aspx
table = str.maketrans({'%': '%25', '$': '%24', '@': '%40',
- "'": '%27', ';': '%3B', '?': '%3F', '*': '%2A', ' ': '%20'})
+ "'": '%27', ';': '%3B', '?': '%3F', '*': '%2A', ' ': '%20'})
option = option.translate(table)
# Since we're surrounding the option with ", if it ends in \ that will
# escape the " when the process arguments are parsed and the starting
diff --git a/mesonbuild/build.py b/mesonbuild/build.py
index ec4bda2..826858d 100644
--- a/mesonbuild/build.py
+++ b/mesonbuild/build.py
@@ -731,12 +731,12 @@ class BuildTarget():
# This should be reliable enough.
if hasattr(dep, 'subproject'):
raise InvalidArguments('Tried to use subproject object as a dependency.\n'
- 'You probably wanted to use a dependency declared in it instead.\n'
- 'Access it by calling get_variable() on the subproject object.')
+ 'You probably wanted to use a dependency declared in it instead.\n'
+ 'Access it by calling get_variable() on the subproject object.')
raise InvalidArguments('Argument is of an unacceptable type {!r}.\nMust be '
- 'either an external dependency (returned by find_library() or '
- 'dependency()) or an internal dependency (returned by '
- 'declare_dependency()).'.format(type(dep).__name__))
+ 'either an external dependency (returned by find_library() or '
+ 'dependency()) or an internal dependency (returned by '
+ 'declare_dependency()).'.format(type(dep).__name__))
def get_external_deps(self):
return self.external_deps
diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py
index b3bc808..d62fd41 100644
--- a/mesonbuild/coredata.py
+++ b/mesonbuild/coredata.py
@@ -159,7 +159,7 @@ def load(filename):
raise MesonException(load_fail_msg)
if obj.version != version:
raise MesonException('Build directory has been generated with Meson version %s, which is incompatible with current version %s.\nPlease delete this build directory AND create a new one.' %
- (obj.version, version))
+ (obj.version, version))
return obj
def save(obj, filename):
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
index 412242a..b6f12fa 100644
--- a/mesonbuild/environment.py
+++ b/mesonbuild/environment.py
@@ -793,9 +793,12 @@ def get_args_from_envvars(compiler):
return ([], [])
# Compile flags
- cflags_mapping = {'c': 'CFLAGS', 'cpp': 'CXXFLAGS',
- 'objc': 'OBJCFLAGS', 'objcpp': 'OBJCXXFLAGS',
- 'fortran': 'FFLAGS', 'd': 'DFLAGS'}
+ cflags_mapping = {'c': 'CFLAGS',
+ 'cpp': 'CXXFLAGS',
+ 'objc': 'OBJCFLAGS',
+ 'objcpp': 'OBJCXXFLAGS',
+ 'fortran': 'FFLAGS',
+ 'd': 'DFLAGS'}
compile_flags = os.environ.get(cflags_mapping[lang], '')
log_var(cflags_mapping[lang], compile_flags)
compile_flags = compile_flags.split()
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py
index b4c724e..0f04864 100644
--- a/mesonbuild/interpreter.py
+++ b/mesonbuild/interpreter.py
@@ -499,7 +499,7 @@ class BuildTargetHolder(InterpreterObject):
def private_dir_include_method(self, args, kwargs):
return IncludeDirsHolder(build.IncludeDirs('', [], False,
- [self.interpreter.backend.get_target_private_dir(self.held_object)]))
+ [self.interpreter.backend.get_target_private_dir(self.held_object)]))
def full_path_method(self, args, kwargs):
return self.interpreter.backend.get_target_filename_abs(self.held_object)
@@ -1774,8 +1774,8 @@ requirements use the version keyword argument instead.''')
# exception; let the caller handle things.
except:
mlog.log('Also couldn\'t find a fallback subproject in',
- mlog.bold(os.path.join(self.subproject_dir, dirname)),
- 'for the dependency', mlog.bold(name))
+ mlog.bold(os.path.join(self.subproject_dir, dirname)),
+ 'for the dependency', mlog.bold(name))
return None
try:
dep = self.subprojects[dirname].get_variable_method([varname], {})
@@ -1792,8 +1792,8 @@ requirements use the version keyword argument instead.''')
found = dep.version_method([], {})
if found == 'undefined' or not mesonlib.version_compare(found, wanted):
mlog.log('Subproject', mlog.bold(dirname), 'dependency',
- mlog.bold(varname), 'version is', mlog.bold(found),
- 'but', mlog.bold(wanted), 'is required.')
+ mlog.bold(varname), 'version is', mlog.bold(found),
+ 'but', mlog.bold(wanted), 'is required.')
return None
mlog.log('Found a', mlog.green('fallback'), 'subproject',
mlog.bold(os.path.join(self.subproject_dir, dirname)), 'for',
diff --git a/mesonbuild/mconf.py b/mesonbuild/mconf.py
index 44a3331..2b5fcf4 100644
--- a/mesonbuild/mconf.py
+++ b/mesonbuild/mconf.py
@@ -130,7 +130,7 @@ class Conf:
carr = []
for key in [ 'buildtype', 'warning_level', 'werror', 'strip', 'unity', 'default_library' ]:
carr.append([key, coredata.get_builtin_option_description(key),
- self.coredata.get_builtin_option(key), coredata.get_builtin_option_choices(key)])
+ self.coredata.get_builtin_option(key), coredata.get_builtin_option_choices(key)])
self.print_aligned(carr)
print('')
print('Base options:')
@@ -180,7 +180,7 @@ class Conf:
'sharedstatedir',
]:
parr.append([key, coredata.get_builtin_option_description(key),
- self.coredata.get_builtin_option(key), coredata.get_builtin_option_choices(key)])
+ self.coredata.get_builtin_option(key), coredata.get_builtin_option_choices(key)])
self.print_aligned(parr)
print('')
print('Project options:')
@@ -206,7 +206,7 @@ class Conf:
tarr = []
for key in [ 'stdsplit', 'errorlogs' ]:
tarr.append([key, coredata.get_builtin_option_description(key),
- self.coredata.get_builtin_option(key), coredata.get_builtin_option_choices(key)])
+ self.coredata.get_builtin_option(key), coredata.get_builtin_option_choices(key)])
self.print_aligned(tarr)
def run(args):
diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
index a919fe5..b9f9ab1 100644
--- a/mesonbuild/modules/gnome.py
+++ b/mesonbuild/modules/gnome.py
@@ -292,7 +292,7 @@ can not be used with the current version of glib-compiled-resources, due to
for source in dep.sources:
if hasattr(source, 'held_object') and isinstance(source.held_object, GirTarget):
gi_includes.update([os.path.join(state.environment.get_build_dir(),
- source.held_object.get_subdir())])
+ source.held_object.get_subdir())])
# This should be any dependency other than an internal one.
elif isinstance(dep, Dependency):
cflags.update(dep.get_compile_args())
@@ -511,7 +511,7 @@ can not be used with the current version of glib-compiled-resources, due to
if kwargs.get('install'):
scankwargs['install'] = kwargs['install']
scankwargs['install_dir'] = kwargs.get('install_dir_gir',
- os.path.join(state.environment.get_datadir(), 'gir-1.0'))
+ os.path.join(state.environment.get_datadir(), 'gir-1.0'))
scan_target = GirTarget(girfile, state.subdir, scankwargs)
typelib_output = '%s-%s.typelib' % (ns, nsversion)
@@ -528,7 +528,7 @@ can not be used with the current version of glib-compiled-resources, due to
if kwargs.get('install'):
typelib_kwargs['install'] = kwargs['install']
typelib_kwargs['install_dir'] = kwargs.get('install_dir_typelib',
- os.path.join(state.environment.get_libdir(), 'girepository-1.0'))
+ os.path.join(state.environment.get_libdir(), 'girepository-1.0'))
typelib_target = TypelibTarget(typelib_output, state.subdir, typelib_kwargs)
return [scan_target, typelib_target]
@@ -575,13 +575,12 @@ can not be used with the current version of glib-compiled-resources, due to
script = [sys.executable, state.environment.get_build_command()]
args = ['--internal',
- 'yelphelper',
- 'install',
- '--subdir=' + state.subdir,
- '--id=' + project_id,
- '--installdir=' + os.path.join(state.environment.get_datadir(), 'help'),
- '--sources=' + source_str,
- ]
+ 'yelphelper',
+ 'install',
+ '--subdir=' + state.subdir,
+ '--id=' + project_id,
+ '--installdir=' + os.path.join(state.environment.get_datadir(), 'help'),
+ '--sources=' + source_str]
if symlinks:
args.append('--symlinks=true')
if media:
@@ -1035,8 +1034,8 @@ can not be used with the current version of glib-compiled-resources, due to
'depends': vapi_depends,
}
install_dir = kwargs.get('install_dir',
- os.path.join(state.environment.coredata.get_builtin_option('datadir'),
- 'vala', 'vapi'))
+ os.path.join(state.environment.coredata.get_builtin_option('datadir'),
+ 'vala', 'vapi'))
if kwargs.get('install'):
custom_kwargs['install'] = kwargs['install']
custom_kwargs['install_dir'] = install_dir
diff --git a/mesonbuild/scripts/gtkdochelper.py b/mesonbuild/scripts/gtkdochelper.py
index 734f80b..6486e28 100644
--- a/mesonbuild/scripts/gtkdochelper.py
+++ b/mesonbuild/scripts/gtkdochelper.py
@@ -108,7 +108,9 @@ def build_gtkdoc(source_root, build_root, doc_subdir, src_subdirs,
if gobject_typesfile:
scanobjs_cmd = ['gtkdoc-scangobj'] + scanobjs_args + [gobject_typesfile,
- '--module=' + module, '--cflags=' + cflags, '--ldflags=' + ldflags]
+ '--module=' + module,
+ '--cflags=' + cflags,
+ '--ldflags=' + ldflags]
gtkdoc_run_check(scanobjs_cmd, abs_out)
diff --git a/mesonbuild/wrap/wrap.py b/mesonbuild/wrap/wrap.py
index d25769a..dead6fb 100644
--- a/mesonbuild/wrap/wrap.py
+++ b/mesonbuild/wrap/wrap.py
@@ -99,7 +99,7 @@ class Resolver:
return packagename
else:
mlog.warning('Subproject directory %s is empty, possibly because of an unfinished'
- 'checkout, removing to reclone' % dirname)
+ 'checkout, removing to reclone' % dirname)
os.rmdir(dirname)
except NotADirectoryError:
raise RuntimeError('%s is not a directory, can not use as subproject.' % dirname)
diff --git a/mesontest.py b/mesontest.py
index 88d0527..49a5278 100755
--- a/mesontest.py
+++ b/mesontest.py
@@ -349,7 +349,7 @@ class TestHarness:
jsonlogfile = open(jsonlogfilename, 'w')
logfile = open(logfilename, 'w')
logfile.write('Log of Meson test suite run on %s.\n\n' %
- datetime.datetime.now().isoformat())
+ datetime.datetime.now().isoformat())
for i in range(self.options.repeat):
for i, test in enumerate(filtered_tests):
@@ -367,7 +367,7 @@ class TestHarness:
res = self.run_single_test(wrap, test)
if not self.options.verbose:
self.print_stats(numlen, filtered_tests, visible_name, res, i,
- logfile, jsonlogfile)
+ logfile, jsonlogfile)
else:
f = executor.submit(self.run_single_test, wrap, test)
if not self.options.verbose:
diff --git a/run_project_tests.py b/run_project_tests.py
index 9f1d4d8..07e7ddb 100755
--- a/run_project_tests.py
+++ b/run_project_tests.py
@@ -518,7 +518,7 @@ def generate_prebuilt():
if __name__ == '__main__':
parser = argparse.ArgumentParser(description="Run the test suite of Meson.")
parser.add_argument('extra_args', nargs='*',
- help='arguments that are passed directly to Meson (remember to have -- before these).')
+ help='arguments that are passed directly to Meson (remember to have -- before these).')
parser.add_argument('--backend', default=None, dest='backend',
choices = backendlist)
options = parser.parse_args()