diff options
-rw-r--r-- | mesonbuild/compilers/detect.py | 46 | ||||
-rw-r--r-- | mesonbuild/dependencies/hdf5.py | 2 | ||||
-rw-r--r-- | mesonbuild/dependencies/pkgconfig.py | 2 | ||||
-rw-r--r-- | mesonbuild/interpreter/compiler.py | 6 | ||||
-rw-r--r-- | mesonbuild/interpreter/interpreter.py | 6 | ||||
-rw-r--r-- | mesonbuild/interpreterbase/interpreterbase.py | 2 | ||||
-rw-r--r-- | mesonbuild/modules/i18n.py | 4 | ||||
-rw-r--r-- | mesonbuild/templates/valatemplates.py | 6 |
8 files changed, 37 insertions, 37 deletions
diff --git a/mesonbuild/compilers/detect.py b/mesonbuild/compilers/detect.py index 572ec35..a1cd552 100644 --- a/mesonbuild/compilers/detect.py +++ b/mesonbuild/compilers/detect.py @@ -381,9 +381,9 @@ def _detect_c_or_cpp_compiler(env: 'Environment', lang: str, for_machine: Machin return os.path.normcase(os.path.abspath(p)) watcom_cls = [sanitize(os.path.join(os.environ['WATCOM'], 'BINNT', 'cl')), - sanitize(os.path.join(os.environ['WATCOM'], 'BINNT', 'cl.exe')), - sanitize(os.path.join(os.environ['WATCOM'], 'BINNT64', 'cl')), - sanitize(os.path.join(os.environ['WATCOM'], 'BINNT64', 'cl.exe')),] + sanitize(os.path.join(os.environ['WATCOM'], 'BINNT', 'cl.exe')), + sanitize(os.path.join(os.environ['WATCOM'], 'BINNT64', 'cl')), + sanitize(os.path.join(os.environ['WATCOM'], 'BINNT64', 'cl.exe')),] found_cl = sanitize(shutil.which('cl')) if found_cl in watcom_cls: mlog.debug('Skipping unsupported cl.exe clone at:', found_cl) @@ -779,7 +779,7 @@ def detect_fortran_compiler(env: 'Environment', for_machine: MachineChoice) -> C cls = PGIFortranCompiler env.coredata.add_lang_args(cls.language, cls, for_machine, env) linker = PGIDynamicLinker(compiler, for_machine, - cls.LINKER_PREFIX, [], version=version) + cls.LINKER_PREFIX, [], version=version) return cls( compiler, version, for_machine, is_cross, info, exe_wrap, full_version=full_version, linker=linker) @@ -788,21 +788,21 @@ def detect_fortran_compiler(env: 'Environment', for_machine: MachineChoice) -> C cls = NvidiaHPC_FortranCompiler env.coredata.add_lang_args(cls.language, cls, for_machine, env) linker = PGIDynamicLinker(compiler, for_machine, - cls.LINKER_PREFIX, [], version=version) + cls.LINKER_PREFIX, [], version=version) return cls( compiler, version, for_machine, is_cross, info, exe_wrap, full_version=full_version, linker=linker) if 'flang' in out or 'clang' in out: linker = guess_nix_linker(env, - compiler, FlangFortranCompiler, for_machine) + compiler, FlangFortranCompiler, for_machine) return FlangFortranCompiler( compiler, version, for_machine, is_cross, info, exe_wrap, full_version=full_version, linker=linker) if 'Open64 Compiler Suite' in err: linker = guess_nix_linker(env, - compiler, Open64FortranCompiler, for_machine) + compiler, Open64FortranCompiler, for_machine) return Open64FortranCompiler( compiler, version, for_machine, is_cross, info, exe_wrap, full_version=full_version, linker=linker) @@ -1036,14 +1036,14 @@ def detect_rust_compiler(env: 'Environment', for_machine: MachineChoice) -> Rust # TODO rewrite this without type: ignore if is_link_exe: linker = type(cc.linker)(for_machine, always_args, exelist=cc.linker.exelist, # type: ignore - version=cc.linker.version, **extra_args) # type: ignore + version=cc.linker.version, **extra_args) # type: ignore else: linker = type(cc.linker)(compiler, for_machine, cc.LINKER_PREFIX, - always_args=always_args, version=cc.linker.version, - **extra_args) # type: ignore + always_args=always_args, version=cc.linker.version, + **extra_args) # type: ignore elif 'link' in override[0]: linker = guess_win_linker(env, - override, cls, for_machine, use_linker_prefix=False) + override, cls, for_machine, use_linker_prefix=False) # rustc takes linker arguments without a prefix, and # inserts the correct prefix itself. assert isinstance(linker, VisualStudioLikeLinkerMixin) @@ -1118,17 +1118,17 @@ def detect_d_compiler(env: 'Environment', for_machine: MachineChoice) -> Compile if info.is_windows() or info.is_cygwin(): objfile = os.path.basename(f)[:-1] + 'obj' linker = guess_win_linker(env, - exelist, - LLVMDCompiler, for_machine, - use_linker_prefix=True, invoked_directly=False, - extra_args=[f]) + exelist, + LLVMDCompiler, for_machine, + use_linker_prefix=True, invoked_directly=False, + extra_args=[f]) else: # LDC writes an object file to the current working directory. # Clean it up. objfile = os.path.basename(f)[:-1] + 'o' linker = guess_nix_linker(env, - exelist, LLVMDCompiler, for_machine, - extra_args=[f]) + exelist, LLVMDCompiler, for_machine, + extra_args=[f]) finally: windows_proof_rm(f) windows_proof_rm(objfile) @@ -1157,13 +1157,13 @@ def detect_d_compiler(env: 'Environment', for_machine: MachineChoice) -> Compile if info.is_windows() or info.is_cygwin(): objfile = os.path.basename(f)[:-1] + 'obj' linker = guess_win_linker(env, - exelist, DmdDCompiler, for_machine, - invoked_directly=False, extra_args=[f, arch_arg]) + exelist, DmdDCompiler, for_machine, + invoked_directly=False, extra_args=[f, arch_arg]) else: objfile = os.path.basename(f)[:-1] + 'o' linker = guess_nix_linker(env, - exelist, DmdDCompiler, for_machine, - extra_args=[f, arch_arg]) + exelist, DmdDCompiler, for_machine, + extra_args=[f, arch_arg]) finally: windows_proof_rm(f) windows_proof_rm(objfile) @@ -1193,8 +1193,8 @@ def detect_swift_compiler(env: 'Environment', for_machine: MachineChoice) -> Com # As for 5.0.1 swiftc *requires* a file to check the linker: with tempfile.NamedTemporaryFile(suffix='.swift') as f: linker = guess_nix_linker(env, - exelist, SwiftCompiler, for_machine, - extra_args=[f.name]) + exelist, SwiftCompiler, for_machine, + extra_args=[f.name]) return SwiftCompiler( exelist, version, for_machine, is_cross, info, linker=linker) diff --git a/mesonbuild/dependencies/hdf5.py b/mesonbuild/dependencies/hdf5.py index 2f1ed0a..ffc1424 100644 --- a/mesonbuild/dependencies/hdf5.py +++ b/mesonbuild/dependencies/hdf5.py @@ -164,7 +164,7 @@ def hdf5_factory(env: 'Environment', for_machine: 'MachineChoice', if PCEXE: # some distros put hdf5-1.2.3.pc with version number in .pc filename. ret = subprocess.run([PCEXE, '--list-all'], stdout=subprocess.PIPE, stderr=subprocess.DEVNULL, - text=True) + text=True) if ret.returncode == 0: for pkg in ret.stdout.split('\n'): if pkg.startswith('hdf5'): diff --git a/mesonbuild/dependencies/pkgconfig.py b/mesonbuild/dependencies/pkgconfig.py index e6921e9..a7b7fc8 100644 --- a/mesonbuild/dependencies/pkgconfig.py +++ b/mesonbuild/dependencies/pkgconfig.py @@ -296,7 +296,7 @@ class PkgConfigDependency(ExternalDependency): continue else: mlog.warning('Library {!r} not found for dependency {!r}, may ' - 'not be successfully linked'.format(libfilename, self.name)) + 'not be successfully linked'.format(libfilename, self.name)) libs_notfound.append(lib) else: lib = foundname diff --git a/mesonbuild/interpreter/compiler.py b/mesonbuild/interpreter/compiler.py index b46f1fe..1242d7a 100644 --- a/mesonbuild/interpreter/compiler.py +++ b/mesonbuild/interpreter/compiler.py @@ -222,9 +222,9 @@ class CompilerHolder(ObjectHolder['Compiler']): return self.compiler.exelist def _determine_args(self, nobuiltins: bool, - incdirs: T.List[build.IncludeDirs], - extra_args: T.List[str], - mode: CompileCheckMode = CompileCheckMode.LINK) -> T.List[str]: + incdirs: T.List[build.IncludeDirs], + extra_args: T.List[str], + mode: CompileCheckMode = CompileCheckMode.LINK) -> T.List[str]: args: T.List[str] = [] for i in incdirs: for idir in i.to_string_list(self.environment.get_source_dir()): diff --git a/mesonbuild/interpreter/interpreter.py b/mesonbuild/interpreter/interpreter.py index 40815d0..0366cd1 100644 --- a/mesonbuild/interpreter/interpreter.py +++ b/mesonbuild/interpreter/interpreter.py @@ -701,14 +701,14 @@ external dependencies (including libraries) must go to "dependencies".''') ) def func_run_command(self, node: mparser.BaseNode, args: T.Tuple[T.Union[build.Executable, ExternalProgram, compilers.Compiler, mesonlib.File, str], - T.List[T.Union[build.Executable, ExternalProgram, compilers.Compiler, mesonlib.File, str]]], + T.List[T.Union[build.Executable, ExternalProgram, compilers.Compiler, mesonlib.File, str]]], kwargs: 'kwargs.RunCommand') -> RunProcess: return self.run_command_impl(node, args, kwargs) def run_command_impl(self, node: mparser.BaseNode, args: T.Tuple[T.Union[build.Executable, ExternalProgram, compilers.Compiler, mesonlib.File, str], - T.List[T.Union[build.Executable, ExternalProgram, compilers.Compiler, mesonlib.File, str]]], + T.List[T.Union[build.Executable, ExternalProgram, compilers.Compiler, mesonlib.File, str]]], kwargs: 'kwargs.RunCommand', in_builddir: bool = False) -> RunProcess: cmd, cargs = args @@ -2286,7 +2286,7 @@ external dependencies (including libraries) must go to "dependencies".''') cmd, *args = mesonlib.listify(_cmd) res = self.run_command_impl(node, (cmd, args), {'capture': True, 'check': True, 'env': build.EnvironmentVariables()}, - True) + True) if 'capture' in kwargs and kwargs['capture']: dst_tmp = ofile_abs + '~' file_encoding = kwargs.setdefault('encoding', 'utf-8') diff --git a/mesonbuild/interpreterbase/interpreterbase.py b/mesonbuild/interpreterbase/interpreterbase.py index d6fe8ed..99f6619 100644 --- a/mesonbuild/interpreterbase/interpreterbase.py +++ b/mesonbuild/interpreterbase/interpreterbase.py @@ -376,7 +376,7 @@ class InterpreterBase: val = _unholder(self.variables[var]) if not isinstance(val, (str, int, float, bool)): raise InvalidCode(f'Identifier "{var}" does not name a formattable variable ' + - '(has to be an integer, a string, a floating point number or a boolean).') + '(has to be an integer, a string, a floating point number or a boolean).') return str(val) except KeyError: diff --git a/mesonbuild/modules/i18n.py b/mesonbuild/modules/i18n.py index 6098d40..d84f66e 100644 --- a/mesonbuild/modules/i18n.py +++ b/mesonbuild/modules/i18n.py @@ -199,7 +199,7 @@ class I18nModule(ExtensionModule): } ct = build.CustomTarget('', state.subdir, state.subproject, - T.cast(T.Dict[str, T.Any], real_kwargs)) + T.cast(T.Dict[str, T.Any], real_kwargs)) return ModuleReturnValue(ct, [ct]) @@ -343,7 +343,7 @@ class I18nModule(ExtensionModule): } ct = build.CustomTarget('', state.subdir, state.subproject, - T.cast(T.Dict[str, T.Any], real_kwargs)) + T.cast(T.Dict[str, T.Any], real_kwargs)) return ModuleReturnValue(ct, [ct]) diff --git a/mesonbuild/templates/valatemplates.py b/mesonbuild/templates/valatemplates.py index 8706ef8..1aeb46a 100644 --- a/mesonbuild/templates/valatemplates.py +++ b/mesonbuild/templates/valatemplates.py @@ -93,9 +93,9 @@ class ValaProject(SampleImpl): open(source_name, 'w', encoding='utf-8').write(hello_vala_template.format(project_name=self.name)) open('meson.build', 'w', encoding='utf-8').write( hello_vala_meson_template.format(project_name=self.name, - exe_name=lowercase_token, - source_name=source_name, - version=self.version)) + exe_name=lowercase_token, + source_name=source_name, + version=self.version)) def create_library(self) -> None: lowercase_token = re.sub(r'[^a-z0-9]', '_', self.name.lower()) |