aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/modules/gnome.py
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2021-10-28 23:01:31 -0400
committerEli Schwartz <eschwartz@archlinux.org>2021-11-01 20:26:18 -0400
commit038b31e72bc02f0a9bdc6d8613992a5c344e8650 (patch)
treef24c7216b2b2934b1d1c7a87cc6727d5a193bcf0 /mesonbuild/modules/gnome.py
parentbae0fdf64ac697b264bdb5eb93dcb160b3e7f6b2 (diff)
downloadmeson-038b31e72bc02f0a9bdc6d8613992a5c344e8650.zip
meson-038b31e72bc02f0a9bdc6d8613992a5c344e8650.tar.gz
meson-038b31e72bc02f0a9bdc6d8613992a5c344e8650.tar.bz2
various manual conversion of percent-formatted strings to f-strings
Diffstat (limited to 'mesonbuild/modules/gnome.py')
-rw-r--r--mesonbuild/modules/gnome.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
index ddde779..85bac5c 100644
--- a/mesonbuild/modules/gnome.py
+++ b/mesonbuild/modules/gnome.py
@@ -386,10 +386,10 @@ class GnomeModule(ExtensionModule):
".", resfile)
except MesonException:
raise MesonException(
- 'Resource "%s" listed in "%s" was not found. If this is a '
- 'generated file, pass the target that generates it to '
- 'gnome.compile_resources() using the "dependencies" '
- 'keyword argument.' % (resfile, input_file))
+ f'Resource "{resfile}" listed in "{input_file}" was not found. '
+ 'If this is a generated file, pass the target that generates '
+ 'it to gnome.compile_resources() using the "dependencies" '
+ 'keyword argument.')
raw_dep_files.remove(resfile)
dep_files.append(f)
dep_files.extend(raw_dep_files)
@@ -476,14 +476,14 @@ class GnomeModule(ExtensionModule):
# For PkgConfigDependency only:
getattr(dep, 'is_libtool', False)):
lib_dir = os.path.dirname(flag)
- external_ldflags.update(["-L%s" % lib_dir])
+ external_ldflags.update([f'-L{lib_dir}'])
if include_rpath:
external_ldflags.update([f'-Wl,-rpath {lib_dir}'])
libname = os.path.basename(flag)
if libname.startswith("lib"):
libname = libname[3:]
libname = libname.split(".so")[0]
- flag = "-l%s" % libname
+ flag = f"-l{libname}"
# FIXME: Hack to avoid passing some compiler options in
if flag.startswith("-W"):
continue
@@ -608,7 +608,7 @@ class GnomeModule(ExtensionModule):
if 'symbol_prefix' in kwargs:
sym_prefixes = mesonlib.stringlistify(kwargs.pop('symbol_prefix', []))
- ret += ['--symbol-prefix=%s' % sym_prefix for sym_prefix in sym_prefixes]
+ ret += [f'--symbol-prefix={sym_prefix}' for sym_prefix in sym_prefixes]
return ret
@@ -619,7 +619,7 @@ class GnomeModule(ExtensionModule):
identifier_prefix = kwargs.pop('identifier_prefix')
if not isinstance(identifier_prefix, str):
raise MesonException('Gir identifier prefix must be str')
- ret += ['--identifier-prefix=%s' % identifier_prefix]
+ ret += [f'--identifier-prefix={identifier_prefix}']
return ret
@@ -629,9 +629,9 @@ class GnomeModule(ExtensionModule):
if 'export_packages' in kwargs:
pkgs = kwargs.pop('export_packages')
if isinstance(pkgs, str):
- ret += ['--pkg-export=%s' % pkgs]
+ ret += [f'--pkg-export={pkgs}']
elif isinstance(pkgs, list):
- ret += ['--pkg-export=%s' % pkg for pkg in pkgs]
+ ret += [f'--pkg-export={pkg}' for pkg in pkgs]
else:
raise MesonException('Gir export packages must be str or list')