aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/dependencies
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2021-07-04 17:51:42 -0400
committerJussi Pakkanen <jpakkane@gmail.com>2021-07-05 17:55:04 +0300
commitdd31891c1fd6d3b9c955e73bd80170242b6423e5 (patch)
treeb6bfd47a74e3ac4f71904afe2ba1996453ce221b /mesonbuild/dependencies
parent566efba216b865bff670901aed98d34f09f8d930 (diff)
downloadmeson-dd31891c1fd6d3b9c955e73bd80170242b6423e5.zip
meson-dd31891c1fd6d3b9c955e73bd80170242b6423e5.tar.gz
meson-dd31891c1fd6d3b9c955e73bd80170242b6423e5.tar.bz2
more f-strings too complex to be caught by pyupgrade
Diffstat (limited to 'mesonbuild/dependencies')
-rw-r--r--mesonbuild/dependencies/base.py4
-rw-r--r--mesonbuild/dependencies/configtool.py3
-rw-r--r--mesonbuild/dependencies/cuda.py4
-rw-r--r--mesonbuild/dependencies/misc.py7
4 files changed, 8 insertions, 10 deletions
diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py
index e12c697..2ecc909 100644
--- a/mesonbuild/dependencies/base.py
+++ b/mesonbuild/dependencies/base.py
@@ -373,8 +373,8 @@ class ExternalDependency(Dependency, HasNativeKwarg):
mlog.log(*found_msg)
if self.required:
- m = 'Unknown version of dependency {!r}, but need {!r}.'
- raise DependencyException(m.format(self.name, self.version_reqs))
+ m = f'Unknown version of dependency {self.name!r}, but need {self.version_reqs!r}.'
+ raise DependencyException(m)
else:
(self.is_found, not_found, found) = \
diff --git a/mesonbuild/dependencies/configtool.py b/mesonbuild/dependencies/configtool.py
index dca519c..788afa3 100644
--- a/mesonbuild/dependencies/configtool.py
+++ b/mesonbuild/dependencies/configtool.py
@@ -135,8 +135,7 @@ class ConfigToolDependency(ExternalDependency):
if p.returncode != 0:
if self.required:
raise DependencyException(
- 'Could not generate {} for {}.\n{}'.format(
- stage, self.name, err))
+ f'Could not generate {stage} for {self.name}.\n{err}')
return []
return split_args(out)
diff --git a/mesonbuild/dependencies/cuda.py b/mesonbuild/dependencies/cuda.py
index 21cc7ab..6bc0f05 100644
--- a/mesonbuild/dependencies/cuda.py
+++ b/mesonbuild/dependencies/cuda.py
@@ -177,7 +177,7 @@ class CudaDependency(SystemDependency):
else:
mlog.warning(f'Could not detect CUDA Toolkit version for {path}')
except Exception as e:
- mlog.warning('Could not detect CUDA Toolkit version for {}: {}'.format(path, str(e)))
+ mlog.warning(f'Could not detect CUDA Toolkit version for {path}: {e!s}')
return '0.0'
@@ -208,7 +208,7 @@ class CudaDependency(SystemDependency):
if m:
return self._strip_patch_version(m.group(1))
except Exception as e:
- mlog.debug('Could not read CUDA Toolkit\'s version file {}: {}'.format(version_file_path, str(e)))
+ mlog.debug(f'Could not read CUDA Toolkit\'s version file {version_file_path}: {e!s}')
return None
diff --git a/mesonbuild/dependencies/misc.py b/mesonbuild/dependencies/misc.py
index f131cb7..483212f 100644
--- a/mesonbuild/dependencies/misc.py
+++ b/mesonbuild/dependencies/misc.py
@@ -188,8 +188,7 @@ class Python3DependencySystem(SystemDependency):
elif pycc.startswith(('i686', 'i386')):
return '32'
else:
- mlog.log('MinGW Python built with unknown CC {!r}, please file'
- 'a bug'.format(pycc))
+ mlog.log(f'MinGW Python built with unknown CC {pycc!r}, please file a bug')
return None
elif pyplat == 'win32':
return '32'
@@ -399,8 +398,8 @@ class ShadercDependency(SystemDependency):
self.is_found = True
if self.static and lib != static_lib:
- mlog.warning('Static library {!r} not found for dependency {!r}, may '
- 'not be statically linked'.format(static_lib, self.name))
+ mlog.warning(f'Static library {static_lib!r} not found for dependency '
+ f'{self.name!r}, may not be statically linked')
break