diff options
Diffstat (limited to 'mesonbuild/compilers/detect.py')
-rw-r--r-- | mesonbuild/compilers/detect.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/mesonbuild/compilers/detect.py b/mesonbuild/compilers/detect.py index a86366a..78a4be8 100644 --- a/mesonbuild/compilers/detect.py +++ b/mesonbuild/compilers/detect.py @@ -548,15 +548,15 @@ def _detect_c_or_cpp_compiler(env: 'Environment', lang: str, for_machine: Machin if version != 'unknown version': break else: - m = 'Failed to detect MSVC compiler version: stderr was\n{!r}' - raise EnvironmentException(m.format(err)) + m = f'Failed to detect MSVC compiler version: stderr was\n{err!r}' + raise EnvironmentException(m) cl_signature = lookat.split('\n')[0] match = re.search(r'.*(x86|x64|ARM|ARM64)([^_A-Za-z0-9]|$)', cl_signature) if match: target = match.group(1) else: - m = 'Failed to detect MSVC compiler target architecture: \'cl /?\' output is\n{}' - raise EnvironmentException(m.format(cl_signature)) + m = f'Failed to detect MSVC compiler target architecture: \'cl /?\' output is\n{cl_signature}' + raise EnvironmentException(m) cls = VisualStudioCCompiler if lang == 'c' else VisualStudioCPPCompiler linker = guess_win_linker(env, ['link'], cls, for_machine) return cls( @@ -1049,8 +1049,8 @@ def detect_d_compiler(env: 'Environment', for_machine: MachineChoice) -> Compile # up to date language version at time (2016). if os.path.basename(exelist[-1]).startswith(('ldmd', 'gdmd')): raise EnvironmentException( - 'Meson does not support {} as it is only a DMD frontend for another compiler.' - 'Please provide a valid value for DC or unset it so that Meson can resolve the compiler by itself.'.format(exelist[-1])) + f'Meson does not support {exelist[-1]} as it is only a DMD frontend for another compiler.' + 'Please provide a valid value for DC or unset it so that Meson can resolve the compiler by itself.') try: p, out = Popen_safe(exelist + ['--version'])[0:2] except OSError as e: |