diff options
author | Mike Sinkovsky <msink@permonline.ru> | 2017-01-06 17:30:43 +0500 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2017-01-11 12:33:27 -0500 |
commit | e9a891fe25a49042be0cc9893a449e5e75187a2d (patch) | |
tree | 8224a9cce438d72a54b98029196b333f6a503061 /mesonbuild/backend | |
parent | 34caf6471c0fad8823ce145d3d38afb81ee181ba (diff) | |
download | meson-e9a891fe25a49042be0cc9893a449e5e75187a2d.zip meson-e9a891fe25a49042be0cc9893a449e5e75187a2d.tar.gz meson-e9a891fe25a49042be0cc9893a449e5e75187a2d.tar.bz2 |
style: [E502] the backslash is redundant between brackets
Diffstat (limited to 'mesonbuild/backend')
-rw-r--r-- | mesonbuild/backend/backends.py | 8 | ||||
-rw-r--r-- | mesonbuild/backend/ninjabackend.py | 61 | ||||
-rw-r--r-- | mesonbuild/backend/vs2010backend.py | 2 | ||||
-rw-r--r-- | mesonbuild/backend/xcodebackend.py | 2 |
4 files changed, 37 insertions, 36 deletions
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py index 7e3f936..e857d60 100644 --- a/mesonbuild/backend/backends.py +++ b/mesonbuild/backend/backends.py @@ -90,7 +90,7 @@ class Backend(): def get_target_filename(self, t): if isinstance(t, build.CustomTarget): if len(t.get_outputs()) != 1: - mlog.warning('custom_target {!r} has more than one output! ' \ + mlog.warning('custom_target {!r} has more than one output! ' 'Using the first one.'.format(t.name)) filename = t.get_outputs()[0] else: @@ -177,7 +177,7 @@ class Backend(): return result def relpath(self, todir, fromdir): - return os.path.relpath(os.path.join('dummyprefixdir', todir),\ + return os.path.relpath(os.path.join('dummyprefixdir', todir), os.path.join('dummyprefixdir', fromdir)) def flatten_object_list(self, target, proj_dir_to_build_root=''): @@ -457,7 +457,7 @@ class Backend(): def get_regen_filelist(self): '''List of all files whose alteration means that the build definition needs to be regenerated.''' - deps = [os.path.join(self.build_to_src, df) \ + deps = [os.path.join(self.build_to_src, df) for df in self.interpreter.get_build_def_files()] if self.environment.is_cross_build(): deps.append(os.path.join(self.build_to_src, @@ -548,7 +548,7 @@ class Backend(): if not absolute_outputs: ofilenames = [os.path.join(self.get_target_dir(target), i) for i in target.output] else: - ofilenames = [os.path.join(self.environment.get_build_dir(), self.get_target_dir(target), i) \ + ofilenames = [os.path.join(self.environment.get_build_dir(), self.get_target_dir(target), i) for i in target.output] srcs = self.get_custom_target_sources(target) outdir = self.get_target_dir(target) diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index 429bb64..52a6f93 100644 --- a/mesonbuild/backend/ninjabackend.py +++ b/mesonbuild/backend/ninjabackend.py @@ -92,9 +92,10 @@ class NinjaBuildElement(): def write(self, outfile): self.check_outputs() - line = 'build %s: %s %s' % (' '.join([ninja_quote(i) for i in self.outfilenames]),\ - self.rule, - ' '.join([ninja_quote(i) for i in self.infilenames])) + line = 'build %s: %s %s' % ( + ' '.join([ninja_quote(i) for i in self.outfilenames]), + self.rule, + ' '.join([ninja_quote(i) for i in self.infilenames])) if len(self.deps) > 0: line += ' | ' + ' '.join([ninja_quote(x) for x in self.deps]) if len(self.orderdeps) > 0: @@ -558,12 +559,12 @@ int dummy; if gcovr_exe: added_rule = True elem = NinjaBuildElement(self.all_outputs, 'coverage-xml', 'CUSTOM_COMMAND', '') - elem.add_item('COMMAND', [gcovr_exe, '-x', '-r', self.environment.get_source_dir(),\ + elem.add_item('COMMAND', [gcovr_exe, '-x', '-r', self.environment.get_source_dir(), '-o', os.path.join(self.environment.get_log_dir(), 'coverage.xml')]) elem.add_item('DESC', 'Generating XML coverage report.') elem.write(outfile) elem = NinjaBuildElement(self.all_outputs, 'coverage-text', 'CUSTOM_COMMAND', '') - elem.add_item('COMMAND', [gcovr_exe, '-r', self.environment.get_source_dir(),\ + elem.add_item('COMMAND', [gcovr_exe, '-r', self.environment.get_source_dir(), '-o', os.path.join(self.environment.get_log_dir(), 'coverage.txt')]) elem.add_item('DESC', 'Generating text coverage report.') elem.write(outfile) @@ -574,10 +575,10 @@ int dummy; phony_elem = NinjaBuildElement(self.all_outputs, 'coverage-html', 'phony', os.path.join(htmloutdir, 'index.html')) phony_elem.write(outfile) elem = NinjaBuildElement(self.all_outputs, os.path.join(htmloutdir, 'index.html'), 'CUSTOM_COMMAND', '') - command = [lcov_exe, '--directory', self.environment.get_build_dir(),\ - '--capture', '--output-file', covinfo, '--no-checksum',\ - '&&', genhtml_exe, '--prefix', self.environment.get_build_dir(),\ - '--output-directory', htmloutdir, '--title', 'Code coverage',\ + command = [lcov_exe, '--directory', self.environment.get_build_dir(), + '--capture', '--output-file', covinfo, '--no-checksum', + '&&', genhtml_exe, '--prefix', self.environment.get_build_dir(), + '--output-directory', htmloutdir, '--title', 'Code coverage', '--legend', '--show-details', covinfo] elem.add_item('COMMAND', command) elem.add_item('DESC', 'Generating HTML coverage report.') @@ -1235,9 +1236,9 @@ int dummy; ''' else: command_templ = ' command = %s $LINK_ARGS %s $in\n' - command = command_templ %\ - (' '.join(static_linker.get_exelist()), - ' '.join(static_linker.get_output_args('$out'))) + command = command_templ % ( + ' '.join(static_linker.get_exelist()), + ' '.join(static_linker.get_output_args('$out'))) description = ' description = Static linking library $out\n\n' outfile.write(rule) outfile.write(command) @@ -1274,10 +1275,10 @@ int dummy; ''' else: command_template = ' command = %s %s $ARGS %s $in $LINK_ARGS $aliasing\n' - command = command_template % \ - (' '.join(compiler.get_linker_exelist()),\ - ' '.join(cross_args),\ - ' '.join(compiler.get_linker_output_args('$out'))) + command = command_template % ( + ' '.join(compiler.get_linker_exelist()), + ' '.join(cross_args), + ' '.join(compiler.get_linker_output_args('$out'))) description = ' description = Linking target $out' outfile.write(rule) outfile.write(command) @@ -1449,12 +1450,12 @@ rule FORTRAN_DEP_HACK ''' else: command_template = ' command = %s %s $ARGS %s %s %s $in\n' - command = command_template % \ - (' '.join([ninja_quote(i) for i in compiler.get_exelist()]),\ - ' '.join(cross_args), - ' '.join(quoted_depargs),\ - ' '.join(compiler.get_output_args('$out')),\ - ' '.join(compiler.get_compile_only_args())) + command = command_template % ( + ' '.join([ninja_quote(i) for i in compiler.get_exelist()]), + ' '.join(cross_args), + ' '.join(quoted_depargs), + ' '.join(compiler.get_output_args('$out')), + ' '.join(compiler.get_compile_only_args())) description = ' description = Compiling %s object $out\n' % langname if compiler.get_id() == 'msvc': deps = ' deps = msvc\n' @@ -1492,12 +1493,12 @@ rule FORTRAN_DEP_HACK output = '' else: output = ' '.join(compiler.get_output_args('$out')) - command = " command = %s %s $ARGS %s %s %s $in\n" % \ - (' '.join(compiler.get_exelist()),\ - ' '.join(cross_args),\ - ' '.join(quoted_depargs),\ - output,\ - ' '.join(compiler.get_compile_only_args())) + command = " command = %s %s $ARGS %s %s %s $in\n" % ( + ' '.join(compiler.get_exelist()), + ' '.join(cross_args), + ' '.join(quoted_depargs), + output, + ' '.join(compiler.get_compile_only_args())) description = ' description = Precompiling header %s\n' % '$in' if compiler.get_id() == 'msvc': deps = ' deps = msvc\n' @@ -1564,7 +1565,7 @@ rule FORTRAN_DEP_HACK depfilename = generator.get_dep_outname(infilename) depfile = os.path.join(self.get_target_private_dir(target), depfilename) args = [x.replace('@DEPFILE@', depfile) for x in base_args] - args = [x.replace("@INPUT@", infilename).replace('@OUTPUT@', sole_output)\ + args = [x.replace("@INPUT@", infilename).replace('@OUTPUT@', sole_output) for x in args] args = self.replace_outputs(args, self.get_target_private_dir(target), outfilelist) # We have consumed output files, so drop them from the list of remaining outputs. @@ -2062,7 +2063,7 @@ rule FORTRAN_DEP_HACK if isinstance(d, build.StaticLibrary): for dep in d.get_external_deps(): commands += dep.get_link_args() - commands += linker.build_rpath_args(self.environment.get_build_dir(),\ + commands += linker.build_rpath_args(self.environment.get_build_dir(), self.determine_rpath_dirs(target), target.install_rpath) custom_target_libraries = self.get_custom_target_provided_libraries(target) commands += extra_args diff --git a/mesonbuild/backend/vs2010backend.py b/mesonbuild/backend/vs2010backend.py index e9d7389..7e6831a 100644 --- a/mesonbuild/backend/vs2010backend.py +++ b/mesonbuild/backend/vs2010backend.py @@ -125,7 +125,7 @@ class Vs2010Backend(backends.Backend): outfiles_rel = genlist.get_outputs_for(curfile) outfiles = [os.path.join(target_private_dir, of) for of in outfiles_rel] generator_output_files += outfiles - args = [x.replace("@INPUT@", infilename).replace('@OUTPUT@', sole_output)\ + args = [x.replace("@INPUT@", infilename).replace('@OUTPUT@', sole_output) for x in base_args] args = self.replace_outputs(args, target_private_dir, outfiles_rel) args = [x.replace("@SOURCE_DIR@", self.environment.get_source_dir()).replace("@BUILD_DIR@", target_private_dir) diff --git a/mesonbuild/backend/xcodebackend.py b/mesonbuild/backend/xcodebackend.py index 7ab3813..622c802 100644 --- a/mesonbuild/backend/xcodebackend.py +++ b/mesonbuild/backend/xcodebackend.py @@ -405,7 +405,7 @@ class XCodeBackend(backends.Backend): self.write_line('%s /* %s */ = {' % (idval, tname)) self.indent_level += 1 self.write_line('isa = PBXNativeTarget;') - self.write_line('buildConfigurationList = %s /* Build configuration list for PBXNativeTarget "%s" */;'\ + self.write_line('buildConfigurationList = %s /* Build configuration list for PBXNativeTarget "%s" */;' % (self.buildconflistmap[tname], tname)) self.write_line('buildPhases = (') self.indent_level += 1 |