aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/backend
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild/backend')
-rw-r--r--mesonbuild/backend/backends.py12
-rw-r--r--mesonbuild/backend/ninjabackend.py14
-rw-r--r--mesonbuild/backend/vs2010backend.py6
3 files changed, 16 insertions, 16 deletions
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py
index 26cba40..e46c2c5 100644
--- a/mesonbuild/backend/backends.py
+++ b/mesonbuild/backend/backends.py
@@ -22,7 +22,7 @@ import json
import subprocess
from ..mesonlib import MesonException, get_compiler_for_source, classify_unity_sources
-class CleanTrees():
+class CleanTrees:
'''
Directories outputted by custom targets that have to be manually cleaned
because on Linux `ninja clean` only deletes empty directories.
@@ -31,7 +31,7 @@ class CleanTrees():
self.build_dir = build_dir
self.trees = trees
-class InstallData():
+class InstallData:
def __init__(self, source_dir, build_dir, prefix):
self.source_dir = source_dir
self.build_dir = build_dir
@@ -45,7 +45,7 @@ class InstallData():
self.install_scripts = []
self.install_subdirs = []
-class ExecutableSerialisation():
+class ExecutableSerialisation:
def __init__(self, name, fname, cmd_args, env, is_cross, exe_wrapper,
workdir, extra_paths, capture):
self.name = name
@@ -76,7 +76,7 @@ class TestSerialisation:
# This class contains the basic functionality that is needed by all backends.
# Feel free to move stuff in and out of it as you see fit.
-class Backend():
+class Backend:
def __init__(self, build):
self.build = build
self.environment = build.environment
@@ -247,7 +247,7 @@ class Backend():
benchmark_data = os.path.join(self.environment.get_scratch_dir(), 'meson_benchmark_setup.dat')
with open(benchmark_data, 'wb') as datafile:
self.write_benchmark_file(datafile)
- return (test_data, benchmark_data)
+ return test_data, benchmark_data
def determine_linker(self, target):
'''
@@ -651,7 +651,7 @@ class Backend():
#
# https://github.com/mesonbuild/meson/pull/737
cmd = [i.replace('\\', '/') for i in cmd]
- return (srcs, ofilenames, cmd)
+ return srcs, ofilenames, cmd
def run_postconf_scripts(self):
env = {'MESON_SOURCE_ROOT': self.environment.get_source_dir(),
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
index cdffb76..8de9b5a 100644
--- a/mesonbuild/backend/ninjabackend.py
+++ b/mesonbuild/backend/ninjabackend.py
@@ -36,7 +36,7 @@ else:
def ninja_quote(text):
return text.replace(' ', '$ ').replace(':', '$:')
-class RawFilename():
+class RawFilename:
"""
Used when a filename is already relative to the root build directory, so
that we know not to add the target's private build directory to it.
@@ -56,7 +56,7 @@ class RawFilename():
def startswith(self, s):
return self.fname.startswith(s)
-class NinjaBuildElement():
+class NinjaBuildElement:
def __init__(self, all_outputs, outfilenames, rule, infilenames):
if isinstance(outfilenames, str):
self.outfilenames = [outfilenames]
@@ -830,7 +830,7 @@ int dummy;
else:
raise InvalidArguments('Unknown resource file %s.' % r)
args.append(a)
- return (args, deps)
+ return args, deps
def generate_cs_target(self, target, outfile):
buildtype = self.environment.coredata.get_builtin_option('buildtype')
@@ -962,7 +962,7 @@ int dummy;
raise InvalidArguments(msg)
# Store 'somefile.vala': GeneratedList (or CustomTarget)
srctype[f] = gensrc
- return (vala, vapi, (others, othersgen))
+ return vala, vapi, (others, othersgen)
def generate_vala_compile(self, target, outfile):
"""Vala is compiled into C. Set up all necessary build steps here."""
@@ -1139,7 +1139,7 @@ int dummy;
srcs.append(i)
else:
others.append(i)
- return (srcs, others)
+ return srcs, others
def generate_swift_target(self, target, outfile):
module_name = self.target_swift_modulename(target)
@@ -1933,7 +1933,7 @@ rule FORTRAN_DEP_HACK
commands += pch_args
commands += self.get_compile_debugfile_args(compiler, target, objname)
dep = dst + '.' + compiler.get_depfile_suffix()
- return (commands, dep, dst, [objname])
+ return commands, dep, dst, [objname]
def generate_gcc_pch_command(self, target, compiler, pch):
commands = []
@@ -1941,7 +1941,7 @@ rule FORTRAN_DEP_HACK
dst = os.path.join(self.get_target_private_dir(target),
os.path.split(pch)[-1] + '.' + compiler.get_pch_suffix())
dep = dst + '.' + compiler.get_depfile_suffix()
- return (commands, dep, dst, []) # Gcc does not create an object file during pch generation.
+ return commands, dep, dst, [] # Gcc does not create an object file during pch generation.
def generate_pch(self, target, outfile):
cstr = ''
diff --git a/mesonbuild/backend/vs2010backend.py b/mesonbuild/backend/vs2010backend.py
index 0cfbe90..525b7f0 100644
--- a/mesonbuild/backend/vs2010backend.py
+++ b/mesonbuild/backend/vs2010backend.py
@@ -47,7 +47,7 @@ def split_o_flags_args(args):
o_flags += ['/O' + f for f in flags]
return o_flags
-class RegenInfo():
+class RegenInfo:
def __init__(self, source_dir, build_dir, depfiles):
self.source_dir = source_dir
self.build_dir = build_dir
@@ -313,7 +313,7 @@ class Vs2010Backend(backends.Backend):
else:
# Everything that is not an object or source file is considered a header.
headers.append(i)
- return (sources, headers, objects, languages)
+ return sources, headers, objects, languages
def target_to_build_root(self, target):
if target.subdir == '':
@@ -512,7 +512,7 @@ class Vs2010Backend(backends.Backend):
libs.append(arg)
else:
other.append(arg)
- return (lpaths, libs, other)
+ return lpaths, libs, other
def _get_cl_compiler(self, target):
for lang, c in target.compilers.items():