aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mesonbuild/backend/ninjabackend.py10
-rw-r--r--mesonbuild/backend/vs2010backend.py2
-rw-r--r--mesonbuild/backend/xcodebackend.py4
-rw-r--r--mesonbuild/interpreter.py2
-rw-r--r--mesonbuild/mintro.py6
-rw-r--r--mesonbuild/scripts/depfixer.py2
-rw-r--r--mesonbuild/wrap/wrap.py2
-rwxr-xr-xrun_project_tests.py2
-rwxr-xr-xrun_tests.py2
-rwxr-xr-xtools/boost_names.py2
10 files changed, 17 insertions, 17 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
index 04838c7..0eb6e98 100644
--- a/mesonbuild/backend/ninjabackend.py
+++ b/mesonbuild/backend/ninjabackend.py
@@ -520,7 +520,7 @@ int dummy;
# This will be set as dependencies of all the target's sources. At the
# same time, also deal with generated sources that need to be compiled.
generated_source_files = []
- for rel_src, gensrc in generated_sources.items():
+ for rel_src, _ in generated_sources.items():
dirpart, fnamepart = os.path.split(rel_src)
raw_src = File(True, dirpart, fnamepart)
if self.environment.is_source(rel_src) and not self.environment.is_header(rel_src):
@@ -585,7 +585,7 @@ int dummy;
obj_list.append(self.generate_single_compile(target, src, 'vala', [], header_deps))
# Generate compile targets for all the pre-existing sources for this target
- for f, src in target_sources.items():
+ for _, src in target_sources.items():
if not self.environment.is_header(src):
if self.environment.is_llvm_ir(src):
obj_list.append(self.generate_llvm_ir_compile(target, src))
@@ -912,7 +912,7 @@ int dummy;
# Add possible java generated files to src list
generated_sources = self.get_target_generated_sources(target)
gen_src_list = []
- for rel_src, gensrc in generated_sources.items():
+ for rel_src, _ in generated_sources.items():
dirpart, fnamepart = os.path.split(rel_src)
raw_src = File(True, dirpart, fnamepart)
if rel_src.endswith('.java'):
@@ -1041,7 +1041,7 @@ int dummy;
def generate_single_java_compile(self, src, target, compiler, args):
deps = [os.path.join(self.get_target_dir(l), l.get_filename()) for l in target.link_targets]
generated_sources = self.get_target_generated_sources(target)
- for rel_src, gensrc in generated_sources.items():
+ for rel_src, _ in generated_sources.items():
if rel_src.endswith('.java'):
deps.append(rel_src)
rel_src = src.rel_to_builddir(self.build_to_src)
@@ -1227,7 +1227,7 @@ int dummy;
if len(target.install_dir) > 3 and target.install_dir[3] is True:
target.install_dir[3] = os.path.join(self.environment.get_datadir(), 'gir-1.0')
# Detect gresources and add --gresources arguments for each
- for (gres, gensrc) in other_src[1].items():
+ for (_, gensrc) in other_src[1].items():
if isinstance(gensrc, modules.GResourceTarget):
gres_xml, = self.get_custom_target_sources(gensrc)
args += ['--gresources=' + gres_xml]
diff --git a/mesonbuild/backend/vs2010backend.py b/mesonbuild/backend/vs2010backend.py
index d1bf1e5..dcf889c 100644
--- a/mesonbuild/backend/vs2010backend.py
+++ b/mesonbuild/backend/vs2010backend.py
@@ -457,7 +457,7 @@ class Vs2010Backend(backends.Backend):
def add_target_deps(self, root, target):
target_dict = {target.get_id(): target}
- for name, dep in self.get_target_deps(target_dict).items():
+ for _, dep in self.get_target_deps(target_dict).items():
if dep.get_id() in self.handled_target_deps[target.get_id()]:
# This dependency was already handled manually.
continue
diff --git a/mesonbuild/backend/xcodebackend.py b/mesonbuild/backend/xcodebackend.py
index 7dd3674..a23f424 100644
--- a/mesonbuild/backend/xcodebackend.py
+++ b/mesonbuild/backend/xcodebackend.py
@@ -345,7 +345,7 @@ class XCodeBackend(backends.Backend):
self.ofile.write('/* End PBXFileReference section */\n')
def generate_pbx_frameworks_buildphase(self):
- for tname, t in self.build.targets.items():
+ for _, t in self.build.targets.items():
self.ofile.write('\n/* Begin PBXFrameworksBuildPhase section */\n')
self.write_line('%s /* %s */ = {\n' % (t.buildphasemap['Frameworks'], 'Frameworks'))
self.indent_level += 1
@@ -587,7 +587,7 @@ class XCodeBackend(backends.Backend):
def generate_pbx_sources_build_phase(self):
self.ofile.write('\n/* Begin PBXSourcesBuildPhase section */\n')
- for name, phase_id in self.source_phase.items():
+ for name, _ in self.source_phase.items():
t = self.build.targets[name]
self.write_line('%s /* Sources */ = {' % (t.buildphasemap[name]))
self.indent_level += 1
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py
index 8ca7758..d125a0c 100644
--- a/mesonbuild/interpreter.py
+++ b/mesonbuild/interpreter.py
@@ -2193,7 +2193,7 @@ class Interpreter(InterpreterBase):
def check_cross_stdlibs(self):
if self.build.environment.is_cross_build():
props = self.build.environment.properties.host
- for l, c in self.build.cross_compilers.items():
+ for l, _ in self.build.cross_compilers.items():
try:
di = mesonlib.stringlistify(props.get_stdlib(l))
if len(di) != 2:
diff --git a/mesonbuild/mintro.py b/mesonbuild/mintro.py
index c47fffd..8c8aa15 100644
--- a/mesonbuild/mintro.py
+++ b/mesonbuild/mintro.py
@@ -117,11 +117,11 @@ def list_installed(installdata):
for t in installdata.targets:
res[os.path.join(installdata.build_dir, t.fname)] = \
os.path.join(installdata.prefix, t.outdir, os.path.basename(t.fname))
- for path, installpath, unused_prefix in installdata.data:
+ for path, installpath, _ in installdata.data:
res[path] = os.path.join(installdata.prefix, installpath)
- for path, installdir, unused_custom_install_mode in installdata.headers:
+ for path, installdir, _ in installdata.headers:
res[path] = os.path.join(installdata.prefix, installdir, os.path.basename(path))
- for path, installpath, unused_custom_install_mode in installdata.man:
+ for path, installpath, _ in installdata.man:
res[path] = os.path.join(installdata.prefix, installpath)
return res
diff --git a/mesonbuild/scripts/depfixer.py b/mesonbuild/scripts/depfixer.py
index 19fe0fe..cc4669c 100644
--- a/mesonbuild/scripts/depfixer.py
+++ b/mesonbuild/scripts/depfixer.py
@@ -180,7 +180,7 @@ class Elf(DataSizes):
def parse_sections(self):
self.bf.seek(self.e_shoff)
self.sections = []
- for i in range(self.e_shnum):
+ for _ in range(self.e_shnum):
self.sections.append(SectionHeader(self.bf, self.ptrsize, self.is_le))
def read_str(self):
diff --git a/mesonbuild/wrap/wrap.py b/mesonbuild/wrap/wrap.py
index 4a5d726..3eb68a7 100644
--- a/mesonbuild/wrap/wrap.py
+++ b/mesonbuild/wrap/wrap.py
@@ -338,7 +338,7 @@ class Resolver:
"""
Copy directory tree. Overwrites also read only files.
"""
- for src_dir, dirs, files in os.walk(root_src_dir):
+ for src_dir, _, files in os.walk(root_src_dir):
dst_dir = src_dir.replace(root_src_dir, root_dst_dir, 1)
if not os.path.exists(dst_dir):
os.makedirs(dst_dir)
diff --git a/run_project_tests.py b/run_project_tests.py
index 8fb351c..4406e1e 100755
--- a/run_project_tests.py
+++ b/run_project_tests.py
@@ -819,7 +819,7 @@ if __name__ == '__main__':
print(l, '\n')
except UnicodeError:
print(l.encode('ascii', errors='replace').decode(), '\n')
- for name, dirs, skip in all_tests:
+ for name, dirs, _ in all_tests:
dirs = (x.name for x in dirs)
for k, g in itertools.groupby(dirs, key=lambda x: x.split()[0]):
tests = list(g)
diff --git a/run_tests.py b/run_tests.py
index fb3bc28..a4b0fa2 100755
--- a/run_tests.py
+++ b/run_tests.py
@@ -136,7 +136,7 @@ def find_vcxproj_with_target(builddir, target):
p = r'<TargetName>{}</TargetName>\s*<TargetExt>\{}</TargetExt>'.format(t, ext)
else:
p = r'<TargetName>{}</TargetName>'.format(t)
- for root, dirs, files in os.walk(builddir):
+ for _, _, files in os.walk(builddir):
for f in fnmatch.filter(files, '*.vcxproj'):
f = os.path.join(builddir, f)
with open(f, 'r', encoding='utf-8') as o:
diff --git a/tools/boost_names.py b/tools/boost_names.py
index d381162..d0e5444 100755
--- a/tools/boost_names.py
+++ b/tools/boost_names.py
@@ -132,7 +132,7 @@ def get_modules_2():
# The python module uses an older build system format and is not easily parseable.
# We add the python module libraries manually.
modules.append(Module('python', 'Python', ['boost_python', 'boost_python3', 'boost_numpy', 'boost_numpy3']))
- for (root, dirs, files) in os.walk(LIBS):
+ for (root, _, files) in os.walk(LIBS):
for f in files:
if f == "libraries.json":
projectdir = os.path.dirname(root)