aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild')
-rw-r--r--mesonbuild/arglist.py2
-rw-r--r--mesonbuild/backend/vs2010backend.py2
-rw-r--r--mesonbuild/build.py2
-rw-r--r--mesonbuild/cmake/interpreter.py2
-rw-r--r--mesonbuild/compilers/compilers.py2
-rw-r--r--mesonbuild/compilers/cpp.py6
-rw-r--r--mesonbuild/compilers/cuda.py4
-rw-r--r--mesonbuild/compilers/d.py6
-rw-r--r--mesonbuild/compilers/fortran.py4
-rw-r--r--mesonbuild/compilers/mixins/clang.py4
-rw-r--r--mesonbuild/compilers/mixins/visualstudio.py6
-rw-r--r--mesonbuild/coredata.py2
-rw-r--r--mesonbuild/dependencies/base.py2
-rw-r--r--mesonbuild/dependencies/boost.py6
-rw-r--r--mesonbuild/dependencies/cuda.py2
-rw-r--r--mesonbuild/dependencies/factory.py2
-rw-r--r--mesonbuild/dependencies/misc.py4
-rw-r--r--mesonbuild/dependencies/qt.py6
-rw-r--r--mesonbuild/environment.py6
-rw-r--r--mesonbuild/interpreter/compiler.py6
-rw-r--r--mesonbuild/interpreter/interpreter.py8
-rw-r--r--mesonbuild/interpreter/interpreterobjects.py4
-rw-r--r--mesonbuild/interpreter/mesonmain.py2
-rw-r--r--mesonbuild/interpreter/type_checking.py4
-rw-r--r--mesonbuild/interpreterbase/baseobjects.py2
-rw-r--r--mesonbuild/interpreterbase/decorators.py10
-rw-r--r--mesonbuild/interpreterbase/operator.py2
-rw-r--r--mesonbuild/linkers/linkers.py2
-rw-r--r--mesonbuild/mcompile.py2
-rw-r--r--mesonbuild/mesonlib/platform.py4
-rw-r--r--mesonbuild/mesonlib/universal.py2
-rw-r--r--mesonbuild/minstall.py2
-rw-r--r--mesonbuild/modules/python.py6
-rw-r--r--mesonbuild/modules/qt.py6
-rw-r--r--mesonbuild/programs.py2
-rw-r--r--mesonbuild/scripts/cmd_or_ps.ps12
-rw-r--r--mesonbuild/scripts/depfixer.py2
37 files changed, 69 insertions, 69 deletions
diff --git a/mesonbuild/arglist.py b/mesonbuild/arglist.py
index e150d39..3ed9621 100644
--- a/mesonbuild/arglist.py
+++ b/mesonbuild/arglist.py
@@ -178,7 +178,7 @@ class CompilerArgs(collections.abc.MutableSequence):
def __setitem__(self, index: T.Union[int, slice], value: T.Union[str, T.Iterable[str]]) -> None: # noqa: F811
self.flush_pre_post()
- self._container[index] = value # type: ignore # TODO: fix 'Invalid index type' and 'Incompatible types in assignment' erros
+ self._container[index] = value # type: ignore # TODO: fix 'Invalid index type' and 'Incompatible types in assignment' errors
def __delitem__(self, index: T.Union[int, slice]) -> None:
self.flush_pre_post()
diff --git a/mesonbuild/backend/vs2010backend.py b/mesonbuild/backend/vs2010backend.py
index dae04ff..51d1c33 100644
--- a/mesonbuild/backend/vs2010backend.py
+++ b/mesonbuild/backend/vs2010backend.py
@@ -1205,7 +1205,7 @@ class Vs2010Backend(backends.Backend):
# Expand our object lists manually if we are on pre-Visual Studio 2015 Update 2
l = t.extract_all_objects(False)
- # Unforunately, we can't use self.object_filename_from_source()
+ # Unfortunately, we can't use self.object_filename_from_source()
for gen in l.genlist:
for src in gen.get_outputs():
if self.environment.is_source(src) and not self.environment.is_header(src):
diff --git a/mesonbuild/build.py b/mesonbuild/build.py
index a9089e9..273f457 100644
--- a/mesonbuild/build.py
+++ b/mesonbuild/build.py
@@ -637,7 +637,7 @@ class Target(HoldableObject):
def parse_overrides(kwargs: T.Dict[str, T.Any]) -> T.Dict[OptionKey, str]:
opts = kwargs.get('override_options', [])
- # In this case we hav ean already parsed and ready to go dictionary
+ # In this case we have an already parsed and ready to go dictionary
# provided by typed_kwargs
if isinstance(opts, dict):
return T.cast(T.Dict[OptionKey, str], opts)
diff --git a/mesonbuild/cmake/interpreter.py b/mesonbuild/cmake/interpreter.py
index f41d2d9..47459a2 100644
--- a/mesonbuild/cmake/interpreter.py
+++ b/mesonbuild/cmake/interpreter.py
@@ -61,7 +61,7 @@ TYPE_mixed = T.Union[str, int, bool, Path, BaseNode]
TYPE_mixed_list = T.Union[TYPE_mixed, T.Sequence[TYPE_mixed]]
TYPE_mixed_kwargs = T.Dict[str, TYPE_mixed_list]
-# Disable all warnings automaticall enabled with --trace and friends
+# Disable all warnings automatically enabled with --trace and friends
# See https://cmake.org/cmake/help/latest/variable/CMAKE_POLICY_WARNING_CMPNNNN.html
disable_policy_warnings = [
'CMP0025',
diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py
index dfa551d..a994fdb 100644
--- a/mesonbuild/compilers/compilers.py
+++ b/mesonbuild/compilers/compilers.py
@@ -1108,7 +1108,7 @@ class Compiler(HoldableObject, metaclass=abc.ABCMeta):
def sanity_check(self, work_dir: str, environment: 'Environment') -> None:
"""Check that this compiler actually works.
- This should provide a simple compile/link test. Somthing as simple as:
+ This should provide a simple compile/link test. Something as simple as:
```python
main(): return 0
```
diff --git a/mesonbuild/compilers/cpp.py b/mesonbuild/compilers/cpp.py
index badd8cc..2e613ec 100644
--- a/mesonbuild/compilers/cpp.py
+++ b/mesonbuild/compilers/cpp.py
@@ -248,7 +248,7 @@ class ClangCPPCompiler(ClangCompiler, CPPCompiler):
def language_stdlib_only_link_flags(self, env: 'Environment') -> T.List[str]:
# We need to apply the search prefix here, as these link arguments may
- # be passed to a differen compiler with a different set of default
+ # be passed to a different compiler with a different set of default
# search paths, such as when using Clang for C/C++ and gfortran for
# fortran,
search_dir = self._get_search_dirs(env)
@@ -262,7 +262,7 @@ class ClangCPPCompiler(ClangCompiler, CPPCompiler):
class AppleClangCPPCompiler(ClangCPPCompiler):
def language_stdlib_only_link_flags(self, env: 'Environment') -> T.List[str]:
# We need to apply the search prefix here, as these link arguments may
- # be passed to a differen compiler with a different set of default
+ # be passed to a different compiler with a different set of default
# search paths, such as when using Clang for C/C++ and gfortran for
# fortran,
search_dir = self._get_search_dirs(env)
@@ -416,7 +416,7 @@ class GnuCPPCompiler(GnuCompiler, CPPCompiler):
def language_stdlib_only_link_flags(self, env: 'Environment') -> T.List[str]:
# We need to apply the search prefix here, as these link arguments may
- # be passed to a differen compiler with a different set of default
+ # be passed to a different compiler with a different set of default
# search paths, such as when using Clang for C/C++ and gfortran for
# fortran,
search_dir = self._get_search_dirs(env)
diff --git a/mesonbuild/compilers/cuda.py b/mesonbuild/compilers/cuda.py
index af607a5..9a3de48 100644
--- a/mesonbuild/compilers/cuda.py
+++ b/mesonbuild/compilers/cuda.py
@@ -195,7 +195,7 @@ class CudaCompiler(Compiler):
a double-quoted string a split-point. Single-quotes do not provide protection
against splitting; In fact, after splitting they are \-escaped. Unfortunately,
double-quotes don't protect against shell expansion. What follows is a
- complex dance to accomodate everybody.
+ complex dance to accommodate everybody.
"""
SQ = "'"
@@ -319,7 +319,7 @@ class CudaCompiler(Compiler):
# follow the name of the option itself by either one of more spaces or an
# equals character. When a one-character short name such as -I, -l, and -L
# is used, the value of the option may also immediately follow the option
- # itself without being seperated by spaces or an equal character. The
+ # itself without being separated by spaces or an equal character. The
# individual values of list options may be separated by commas in a single
# instance of the option, or the option may be repeated, or any
# combination of these two cases.
diff --git a/mesonbuild/compilers/d.py b/mesonbuild/compilers/d.py
index 18a5d68..f550a33 100644
--- a/mesonbuild/compilers/d.py
+++ b/mesonbuild/compilers/d.py
@@ -353,7 +353,7 @@ class DmdLikeCompilerMixin(CompilerMixinBase):
# - arguments like "-L=@rpath/xxx" without a second argument (on Apple platform)
# - arguments like "-L=/SUBSYSTEM:CONSOLE (for Windows linker)
#
- # The logic that follows trys to detect all these cases (some may be missing)
+ # The logic that follows tries to detect all these cases (some may be missing)
# in order to prepend a -L only for the library search paths with a single -L
if arg.startswith('-L='):
@@ -816,8 +816,8 @@ class LLVMDCompiler(DmdLikeCompilerMixin, DCompiler):
return ['--release']
def rsp_file_syntax(self) -> RSPFileSyntax:
- # We use `mesonlib.is_windows` here because we want to konw what the
- # build machine is, not the host machine. This really means whe whould
+ # We use `mesonlib.is_windows` here because we want to know what the
+ # build machine is, not the host machine. This really means we would
# have the Environment not the MachineInfo in the compiler.
return RSPFileSyntax.MSVC if is_windows() else RSPFileSyntax.GCC
diff --git a/mesonbuild/compilers/fortran.py b/mesonbuild/compilers/fortran.py
index 24c41d5..264c035 100644
--- a/mesonbuild/compilers/fortran.py
+++ b/mesonbuild/compilers/fortran.py
@@ -213,7 +213,7 @@ class GnuFortranCompiler(GnuCompiler, FortranCompiler):
def language_stdlib_only_link_flags(self, env: 'Environment') -> T.List[str]:
# We need to apply the search prefix here, as these link arguments may
- # be passed to a differen compiler with a different set of default
+ # be passed to a different compiler with a different set of default
# search paths, such as when using Clang for C/C++ and gfortran for
# fortran,
search_dir = self._get_search_dirs(env)
@@ -484,7 +484,7 @@ class FlangFortranCompiler(ClangCompiler, FortranCompiler):
def language_stdlib_only_link_flags(self, env: 'Environment') -> T.List[str]:
# We need to apply the search prefix here, as these link arguments may
- # be passed to a differen compiler with a different set of default
+ # be passed to a different compiler with a different set of default
# search paths, such as when using Clang for C/C++ and gfortran for
# fortran,
# XXX: Untested....
diff --git a/mesonbuild/compilers/mixins/clang.py b/mesonbuild/compilers/mixins/clang.py
index 133ce96..b3ce7f1 100644
--- a/mesonbuild/compilers/mixins/clang.py
+++ b/mesonbuild/compilers/mixins/clang.py
@@ -82,7 +82,7 @@ class ClangCompiler(GnuLikeCompiler):
def get_compiler_check_args(self, mode: CompileCheckMode) -> T.List[str]:
# Clang is different than GCC, it will return True when a symbol isn't
- # defined in a header. Specifically this seems ot have something to do
+ # defined in a header. Specifically this seems to have something to do
# with functions that may be in a header on some systems, but not all of
# them. `strlcat` specifically with can trigger this.
myargs: T.List[str] = ['-Werror=implicit-function-declaration']
@@ -119,7 +119,7 @@ class ClangCompiler(GnuLikeCompiler):
@classmethod
def use_linker_args(cls, linker: str) -> T.List[str]:
# Clang additionally can use a linker specified as a path, which GCC
- # (and other gcc-like compilers) cannot. This is becuse clang (being
+ # (and other gcc-like compilers) cannot. This is because clang (being
# llvm based) is retargetable, while GCC is not.
#
diff --git a/mesonbuild/compilers/mixins/visualstudio.py b/mesonbuild/compilers/mixins/visualstudio.py
index 0360fa7..2e46e9d 100644
--- a/mesonbuild/compilers/mixins/visualstudio.py
+++ b/mesonbuild/compilers/mixins/visualstudio.py
@@ -146,7 +146,7 @@ class VisualStudioLikeCompiler(Compiler, metaclass=abc.ABCMeta):
return pchname
def get_pch_base_name(self, header: str) -> str:
- # This needs to be implemented by inherting classes
+ # This needs to be implemented by inheriting classes
raise NotImplementedError
def get_pch_use_args(self, pch_dir: str, header: str) -> T.List[str]:
@@ -383,7 +383,7 @@ class VisualStudioLikeCompiler(Compiler, metaclass=abc.ABCMeta):
class MSVCCompiler(VisualStudioLikeCompiler):
- """Spcific to the Microsoft Compilers."""
+ """Specific to the Microsoft Compilers."""
def __init__(self, target: str):
super().__init__(target)
@@ -415,7 +415,7 @@ class MSVCCompiler(VisualStudioLikeCompiler):
class ClangClCompiler(VisualStudioLikeCompiler):
- """Spcific to Clang-CL."""
+ """Specific to Clang-CL."""
def __init__(self, target: str):
super().__init__(target)
diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py
index 7782bd1..92e878e 100644
--- a/mesonbuild/coredata.py
+++ b/mesonbuild/coredata.py
@@ -552,7 +552,7 @@ class CoreData:
This way everyone can do f.ex, get_option('libdir') and be sure to get
the library directory relative to prefix.
- .as_posix() keeps the posix-like file seperators Meson uses.
+ .as_posix() keeps the posix-like file separators Meson uses.
'''
try:
value = PurePath(value)
diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py
index 86e88a8..02ef30c 100644
--- a/mesonbuild/dependencies/base.py
+++ b/mesonbuild/dependencies/base.py
@@ -187,7 +187,7 @@ class Dependency(HoldableObject):
raise RuntimeError('Unreachable code in partial_dependency called')
def _add_sub_dependency(self, deplist: T.Iterable[T.Callable[[], 'Dependency']]) -> bool:
- """Add an internal depdency from a list of possible dependencies.
+ """Add an internal dependency from a list of possible dependencies.
This method is intended to make it easier to add additional
dependencies to another dependency internally.
diff --git a/mesonbuild/dependencies/boost.py b/mesonbuild/dependencies/boost.py
index 038ea17..aadf3f8 100644
--- a/mesonbuild/dependencies/boost.py
+++ b/mesonbuild/dependencies/boost.py
@@ -240,7 +240,7 @@ class BoostLibraryFile():
def fix_python_name(self, tags: T.List[str]) -> T.List[str]:
# Handle the boost_python naming madeness.
# See https://github.com/mesonbuild/meson/issues/4788 for some distro
- # specific naming variantions.
+ # specific naming variations.
other_tags = [] # type: T.List[str]
# Split the current modname into the base name and the version
@@ -320,7 +320,7 @@ class BoostLibraryFile():
elif vscrt in ['/MTd', '-MTd']:
return (self.runtime_static or not self.static) and self.runtime_debug
- mlog.warning(f'Boost: unknow vscrt tag {vscrt}. This may cause the compilation to fail. Please consider reporting this as a bug.', once=True)
+ mlog.warning(f'Boost: unknown vscrt tag {vscrt}. This may cause the compilation to fail. Please consider reporting this as a bug.', once=True)
return True
def get_compiler_args(self) -> T.List[str]:
@@ -405,7 +405,7 @@ class BoostDependency(SystemDependency):
The machine file values are defaulted to the environment values.
"""
- # XXX: if we had a TypedDict we woudn't need this
+ # XXX: if we had a TypedDict we wouldn't need this
incdir = props.get('boost_includedir')
assert incdir is None or isinstance(incdir, str)
libdir = props.get('boost_librarydir')
diff --git a/mesonbuild/dependencies/cuda.py b/mesonbuild/dependencies/cuda.py
index bdd2f50..d9b69c5 100644
--- a/mesonbuild/dependencies/cuda.py
+++ b/mesonbuild/dependencies/cuda.py
@@ -199,7 +199,7 @@ class CudaDependency(SystemDependency):
return None
def _read_toolkit_version_txt(self, path: str) -> T.Optional[str]:
- # Read 'version.txt' at the root of the CUDA Toolkit directory to determine the tookit version
+ # Read 'version.txt' at the root of the CUDA Toolkit directory to determine the toolkit version
version_file_path = os.path.join(path, 'version.txt')
try:
with open(version_file_path, encoding='utf-8') as version_file:
diff --git a/mesonbuild/dependencies/factory.py b/mesonbuild/dependencies/factory.py
index 048e3bc..9346abe 100644
--- a/mesonbuild/dependencies/factory.py
+++ b/mesonbuild/dependencies/factory.py
@@ -63,7 +63,7 @@ class DependencyFactory:
:methods: An ordered list of DependencyMethods. This is the order
dependencies will be returned in unless they are removed by the
_process_method function
- :*_name: This will overwrite the name passed to the coresponding class.
+ :*_name: This will overwrite the name passed to the corresponding class.
For example, if the name is 'zlib', but cmake calls the dependency
'Z', then using `cmake_name='Z'` will pass the name as 'Z' to cmake.
:*_class: A *type* or callable that creates a class, and has the
diff --git a/mesonbuild/dependencies/misc.py b/mesonbuild/dependencies/misc.py
index daa7dff..7c384f6 100644
--- a/mesonbuild/dependencies/misc.py
+++ b/mesonbuild/dependencies/misc.py
@@ -432,7 +432,7 @@ class CursesSystemDependency(SystemDependency):
v_minor, _ = self.clib_compiler.get_define('PDC_VER_MINOR', f'#include <{header}>', env, [], [self])
self.version = f'{v_major}.{v_minor}'
- # Check the version if possible, emit a wraning if we can't
+ # Check the version if possible, emit a warning if we can't
req = kwargs.get('version')
if req:
if self.version:
@@ -589,7 +589,7 @@ python3_factory = DependencyFactory(
system_class=Python3DependencySystem,
# There is no version number in the macOS version number
framework_name='Python',
- # There is a python in /System/Library/Frameworks, but thats python 2.x,
+ # There is a python in /System/Library/Frameworks, but that's python 2.x,
# Python 3 will always be in /Library
extra_kwargs={'paths': ['/Library/Frameworks']},
)
diff --git a/mesonbuild/dependencies/qt.py b/mesonbuild/dependencies/qt.py
index 4eef71e..699f912 100644
--- a/mesonbuild/dependencies/qt.py
+++ b/mesonbuild/dependencies/qt.py
@@ -113,7 +113,7 @@ class QtExtraFrameworkDependency(ExtraFrameworkDependency):
class _QtBase:
- """Mixin class for shared componenets between PkgConfig and Qmake."""
+ """Mixin class for shared components between PkgConfig and Qmake."""
link_args: T.List[str]
clib_compiler: 'Compiler'
@@ -239,8 +239,8 @@ class QmakeQtDependency(_QtBase, ConfigToolDependency, metaclass=abc.ABCMeta):
_QtBase.__init__(self, name, kwargs)
self.tools = [f'qmake-{self.qtname}', 'qmake']
- # Add additional constraits that the Qt version is met, but preserve
- # any version requrements the user has set as well. For exmaple, if Qt5
+ # Add additional constraints that the Qt version is met, but preserve
+ # any version requrements the user has set as well. For example, if Qt5
# is requested, add "">= 5, < 6", but if the user has ">= 5.6", don't
# lose that.
kwargs = kwargs.copy()
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
index f095bfb..7062c98 100644
--- a/mesonbuild/environment.py
+++ b/mesonbuild/environment.py
@@ -69,7 +69,7 @@ def _get_env_var(for_machine: MachineChoice, is_cross: bool, var_name: str) -> T
# allows native builds to never need to worry about the 'BUILD_*'
# ones.
([var_name + '_FOR_BUILD'] if is_cross else [var_name]),
- # Always just the unprefixed host verions
+ # Always just the unprefixed host versions
[var_name]
)[for_machine]
for var in candidates:
@@ -687,11 +687,11 @@ class Environment:
# time) until we're instantiating that `Compiler`
# object. This is required so that passing
# `-Dc_args=` on the command line and `$CFLAGS`
- # have subtely differen behavior. `$CFLAGS` will be
+ # have subtely different behavior. `$CFLAGS` will be
# added to the linker command line if the compiler
# acts as a linker driver, `-Dc_args` will not.
#
- # We stil use the original key as the base here, as
+ # We still use the original key as the base here, as
# we want to inhert the machine and the compiler
# language
key = key.evolve('env_args')
diff --git a/mesonbuild/interpreter/compiler.py b/mesonbuild/interpreter/compiler.py
index 01a6989..174c268 100644
--- a/mesonbuild/interpreter/compiler.py
+++ b/mesonbuild/interpreter/compiler.py
@@ -1,6 +1,6 @@
# SPDX-Licnese-Identifier: Apache-2.0
# Copyright 2012-2021 The Meson development team
-# Copyright © 2021 Intel Corpration
+# Copyright © 2021 Intel Corporation
import enum
import functools
@@ -250,7 +250,7 @@ class CompilerHolder(ObjectHolder['Compiler']):
deps = next_deps
deps = final_deps
else:
- # Ensure that we alway return a new instance
+ # Ensure that we always return a new instance
deps = deps.copy()
return deps, self._dep_msg(deps, endl)
@@ -622,7 +622,7 @@ class CompilerHolder(ObjectHolder['Compiler']):
def _has_argument_impl(self, arguments: T.Union[str, T.List[str]],
mode: _TestMode = _TestMode.COMPILER) -> bool:
- """Shared implementaiton for methods checking compiler and linker arguments."""
+ """Shared implementation for methods checking compiler and linker arguments."""
# This simplifies the callers
if isinstance(arguments, str):
arguments = [arguments]
diff --git a/mesonbuild/interpreter/interpreter.py b/mesonbuild/interpreter/interpreter.py
index 7e2a934..b82525f 100644
--- a/mesonbuild/interpreter/interpreter.py
+++ b/mesonbuild/interpreter/interpreter.py
@@ -424,7 +424,7 @@ class Interpreter(InterpreterBase, HoldableObject):
'''
Build a mapping of `HoldableObject` base classes to their
corresponding `ObjectHolder`s. The difference to `self.holder_map`
- is that the keys here define an upper bound instead of requireing an
+ is that the keys here define an upper bound instead of requiring an
exact match.
The mappings defined here are only used when there was no direct hit
@@ -574,7 +574,7 @@ class Interpreter(InterpreterBase, HoldableObject):
try:
# check if stable module exists
mod = self._import_module(plainname, required)
- # XXX: this is acutally not helpful, since it doesn't do a version check
+ # XXX: this is actually not helpful, since it doesn't do a version check
mlog.warning(f'Module {modname} is now stable, please use the {plainname} module instead.')
return mod
except InvalidArguments:
@@ -1039,7 +1039,7 @@ external dependencies (including libraries) must go to "dependencies".''')
self.project_default_options = mesonlib.stringlistify(kwargs.get('default_options', []))
self.project_default_options = coredata.create_options_dict(self.project_default_options, self.subproject)
- # If this is the first invocation we alway sneed to initialize
+ # If this is the first invocation we always need to initialize
# builtins, if this is a subproject that is new in a re-invocation we
# need to initialize builtins for that
if self.environment.first_invocation or (self.subproject != '' and self.subproject not in self.coredata.initialized_subprojects):
@@ -1685,7 +1685,7 @@ external dependencies (including libraries) must go to "dependencies".''')
# Set this to None to satisfy process_kwargs
kwargs['build_always'] = None
- # These are are nullaable so that we can konw whether they're explicitly
+ # These are are nullaable so that we can know whether they're explicitly
# set or not. If they haven't been overwritten, set them to their true
# default
if kwargs['build_by_default'] is None:
diff --git a/mesonbuild/interpreter/interpreterobjects.py b/mesonbuild/interpreter/interpreterobjects.py
index b0447e6..b4dc96c 100644
--- a/mesonbuild/interpreter/interpreterobjects.py
+++ b/mesonbuild/interpreter/interpreterobjects.py
@@ -252,7 +252,7 @@ class EnvironmentVariablesHolder(ObjectHolder[build.EnvironmentVariables], Mutab
return repr_str.format(self.__class__.__name__, self.held_object.envvars)
def __deepcopy__(self, memo: T.Dict[str, object]) -> 'EnvironmentVariablesHolder':
- # Avoid trying to copy the intepreter
+ # Avoid trying to copy the interpreter
return EnvironmentVariablesHolder(copy.deepcopy(self.held_object), self.interpreter)
def warn_if_has_name(self, name: str) -> None:
@@ -687,7 +687,7 @@ class NullSubprojectInterpreter(HoldableObject):
# TODO: This should really be an `ObjectHolder`, but the additional stuff in this
# class prevents this. Thus, this class should be split into a pure
-# `ObjectHolder` and a class specifically for stroing in `Interpreter`.
+# `ObjectHolder` and a class specifically for storing in `Interpreter`.
class SubprojectHolder(MesonInterpreterObject):
def __init__(self, subinterpreter: T.Union['Interpreter', NullSubprojectInterpreter],
diff --git a/mesonbuild/interpreter/mesonmain.py b/mesonbuild/interpreter/mesonmain.py
index c35fddc..5c4d3ed 100644
--- a/mesonbuild/interpreter/mesonmain.py
+++ b/mesonbuild/interpreter/mesonmain.py
@@ -360,7 +360,7 @@ class MesonMain(MesonInterpreterObject):
else:
# dependency('foo') without specifying static kwarg should find this
# override regardless of the static value here. But do not raise error
- # if it has already been overridden, which would happend when overriding
+ # if it has already been overridden, which would happen when overriding
# static and shared separately:
# meson.override_dependency('foo', shared_dep, static: false)
# meson.override_dependency('foo', static_dep, static: true)
diff --git a/mesonbuild/interpreter/type_checking.py b/mesonbuild/interpreter/type_checking.py
index 310f281..03091bb 100644
--- a/mesonbuild/interpreter/type_checking.py
+++ b/mesonbuild/interpreter/type_checking.py
@@ -82,12 +82,12 @@ def _install_mode_validator(mode: T.List[T.Union[str, bool, int]]) -> T.Optional
def _install_mode_convertor(mode: T.Optional[T.List[T.Union[str, bool, int]]]) -> FileMode:
- """Convert the DSL form of the `install_mode` keyword arugment to `FileMode`
+ """Convert the DSL form of the `install_mode` keyword argument to `FileMode`
This is not required, and if not required returns None
TODO: It's not clear to me why this needs to be None and not just return an
- emtpy FileMode.
+ empty FileMode.
"""
# this has already been validated by the validator
return FileMode(*(m if isinstance(m, str) else None for m in mode))
diff --git a/mesonbuild/interpreterbase/baseobjects.py b/mesonbuild/interpreterbase/baseobjects.py
index 7e98b48..992ee14 100644
--- a/mesonbuild/interpreterbase/baseobjects.py
+++ b/mesonbuild/interpreterbase/baseobjects.py
@@ -145,7 +145,7 @@ class ObjectHolder(InterpreterObject, T.Generic[InterpreterObjectTypeVar]):
self.interpreter = interpreter
self.env = self.interpreter.environment
- # Hide the object holder abstrction from the user
+ # Hide the object holder abstraction from the user
def display_name(self) -> str:
return type(self.held_object).__name__
diff --git a/mesonbuild/interpreterbase/decorators.py b/mesonbuild/interpreterbase/decorators.py
index 54a4960..5030b48 100644
--- a/mesonbuild/interpreterbase/decorators.py
+++ b/mesonbuild/interpreterbase/decorators.py
@@ -165,7 +165,7 @@ def typed_pos_args(name: str, *types: T.Union[T.Type, T.Tuple[T.Type, ...]],
min_varargs: int = 0, max_varargs: int = 0) -> T.Callable[..., T.Any]:
"""Decorator that types type checking of positional arguments.
- This supports two different models of optional aguments, the first is the
+ This supports two different models of optional arguments, the first is the
variadic argument model. Variadic arguments are a possibly bounded,
possibly unbounded number of arguments of the same type (unions are
supported). The second is the standard default value model, in this case
@@ -180,7 +180,7 @@ def typed_pos_args(name: str, *types: T.Union[T.Type, T.Tuple[T.Type, ...]],
:min_varargs: the minimum number of variadic arguments taken
:max_varargs: the maximum number of variadic arguments taken. 0 means unlimited
:optargs: The types of any optional arguments parameters taken. If None
- then no optional paramters are taken.
+ then no optional parameters are taken.
Some examples of usage blow:
>>> @typed_pos_args('mod.func', str, (str, int))
@@ -370,12 +370,12 @@ class KwargInfo(T.Generic[_T]):
:param convertor: A callable that converts the raw input value into a
different type. This is intended for cases such as the meson DSL using a
string, but the implementation using an Enum. This should not do
- validation, just converstion.
+ validation, just conversion.
:param deprecated_values: a dictionary mapping a value to the version of
meson it was deprecated in.
:param since_values: a dictionary mapping a value to the version of meson it was
added in.
- :param not_set_warning: A warning messsage that is logged if the kwarg is not
+ :param not_set_warning: A warning message that is logged if the kwarg is not
set by the user.
"""
def __init__(self, name: str,
@@ -450,7 +450,7 @@ def typed_kwargs(name: str, *types: KwargInfo) -> T.Callable[..., T.Any]:
If type tyhpe is a :class:ContainerTypeInfo, then the default value will be
passed as an argument to the container initializer, making a shallow copy
- :param name: the name of the function, including the object it's attached ot
+ :param name: the name of the function, including the object it's attached to
(if applicable)
:param *types: KwargInfo entries for each keyword argument.
"""
diff --git a/mesonbuild/interpreterbase/operator.py b/mesonbuild/interpreterbase/operator.py
index cfaddc7..5dec8d0 100644
--- a/mesonbuild/interpreterbase/operator.py
+++ b/mesonbuild/interpreterbase/operator.py
@@ -18,7 +18,7 @@ class MesonOperator(Enum):
# Should return the boolsche interpretation of the value (`'' == false` for instance)
BOOL = 'bool()'
- # Comparision
+ # Comparison
EQUALS = '=='
NOT_EQUALS = '!='
GREATER = '>'
diff --git a/mesonbuild/linkers/linkers.py b/mesonbuild/linkers/linkers.py
index 9332baa..e535ea0 100644
--- a/mesonbuild/linkers/linkers.py
+++ b/mesonbuild/linkers/linkers.py
@@ -113,7 +113,7 @@ class StaticLinker:
be implemented
"""
assert not self.can_linker_accept_rsp(), f'{self.id} linker accepts RSP, but doesn\' provide a supported format, this is a bug'
- raise EnvironmentException(f'{self.id} does not implemnt rsp format, this shouldn\'t be called')
+ raise EnvironmentException(f'{self.id} does not implement rsp format, this shouldn\'t be called')
class VisualStudioLikeLinker:
diff --git a/mesonbuild/mcompile.py b/mesonbuild/mcompile.py
index e20485c..f586fde 100644
--- a/mesonbuild/mcompile.py
+++ b/mesonbuild/mcompile.py
@@ -125,7 +125,7 @@ def get_target_from_intro_data(target: ParsedTargetName, builddir: Path, introsp
if not found_targets:
raise MesonException(f'Can\'t invoke target `{target.full_name}`: target not found')
elif len(found_targets) > 1:
- raise MesonException(f'Can\'t invoke target `{target.full_name}`: ambigious name. Add target type and/or path: `PATH/NAME:TYPE`')
+ raise MesonException(f'Can\'t invoke target `{target.full_name}`: ambiguous name. Add target type and/or path: `PATH/NAME:TYPE`')
return found_targets[0]
diff --git a/mesonbuild/mesonlib/platform.py b/mesonbuild/mesonlib/platform.py
index cdd42b1..f0676a6 100644
--- a/mesonbuild/mesonlib/platform.py
+++ b/mesonbuild/mesonlib/platform.py
@@ -23,7 +23,7 @@ from .. import mlog
__all__ = ['BuildDirLock']
-# This needs to be inheritted by the specific implementations to make type
+# This needs to be inherited by the specific implementations to make type
# checking happy
class BuildDirLock:
@@ -31,7 +31,7 @@ class BuildDirLock:
self.lockfilename = os.path.join(builddir, 'meson-private/meson.lock')
def __enter__(self) -> None:
- mlog.debug('Calling ther no-op version of BuildDirLock')
+ mlog.debug('Calling the no-op version of BuildDirLock')
def __exit__(self, *args: T.Any) -> None:
pass
diff --git a/mesonbuild/mesonlib/universal.py b/mesonbuild/mesonlib/universal.py
index ebf9cb0..e142528 100644
--- a/mesonbuild/mesonlib/universal.py
+++ b/mesonbuild/mesonlib/universal.py
@@ -1731,7 +1731,7 @@ class OrderedSet(T.MutableSet[_T]):
return 'OrderedSet()'
def __reversed__(self) -> T.Iterator[_T]:
- # Mypy is complaining that sets cant be reversed, which is true for
+ # Mypy is complaining that sets can't be reversed, which is true for
# unordered sets, but this is an ordered, set so reverse() makes sense.
return reversed(self.__container.keys()) # type: ignore
diff --git a/mesonbuild/minstall.py b/mesonbuild/minstall.py
index e3934a7..0837808 100644
--- a/mesonbuild/minstall.py
+++ b/mesonbuild/minstall.py
@@ -174,7 +174,7 @@ def set_chmod(path: str, mode: int, dir_fd: T.Optional[int] = None,
def sanitize_permissions(path: str, umask: T.Union[str, int]) -> None:
# TODO: with python 3.8 or typing_extensions we could replace this with
- # `umask: T.Union[T.Literal['preserve'], int]`, which would be mroe correct
+ # `umask: T.Union[T.Literal['preserve'], int]`, which would be more correct
if umask == 'preserve':
return
assert isinstance(umask, int), 'umask should only be "preserver" or an integer'
diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py
index 58d805b..f479ab9 100644
--- a/mesonbuild/modules/python.py
+++ b/mesonbuild/modules/python.py
@@ -265,7 +265,7 @@ def python_factory(env: 'Environment', for_machine: 'MachineChoice',
if DependencyMethods.EXTRAFRAMEWORK in methods:
nkwargs = kwargs.copy()
if mesonlib.version_compare(pkg_version, '>= 3'):
- # There is a python in /System/Library/Frameworks, but thats python 2.x,
+ # There is a python in /System/Library/Frameworks, but that's python 2.x,
# Python 3 will always be in /Library
nkwargs['paths'] = ['/Library/Frameworks']
candidates.append(functools.partial(PythonFrameworkDependency, 'Python', env, nkwargs, installation))
@@ -355,7 +355,7 @@ class PythonExternalProgram(ExternalProgram):
# We want strong key values, so we always populate this with bogus data.
# Otherwise to make the type checkers happy we'd have to do .get() for
- # everycall, even though we konw that the introspection data will be
+ # everycall, even though we know that the introspection data will be
# complete
self.info: 'PythonIntrospectionDict' = {
'install_paths': {},
@@ -634,7 +634,7 @@ class PythonModule(ExtensionModule):
missing_modules: T.List[str] = []
# FIXME: this code is *full* of sharp corners. It assumes that it's
- # going to get a string value (or now a list of lenght 1), of `python2`
+ # going to get a string value (or now a list of length 1), of `python2`
# or `python3` which is completely nonsense. On windows the value could
# easily be `['py', '-3']`, or `['py', '-3.7']` to get a very specific
# version of python. On Linux we might want a python that's not in
diff --git a/mesonbuild/modules/qt.py b/mesonbuild/modules/qt.py
index 874bcb1..939dc21 100644
--- a/mesonbuild/modules/qt.py
+++ b/mesonbuild/modules/qt.py
@@ -191,7 +191,7 @@ class QtBaseModule(ExtensionModule):
abspath = rcc_file.absolute_path(state.environment.source_dir, state.environment.build_dir)
rcc_dirname = os.path.dirname(abspath)
- # FIXME: what error are we actually tring to check here?
+ # FIXME: what error are we actually trying to check here?
try:
tree = ET.parse(abspath)
root = tree.getroot()
@@ -425,7 +425,7 @@ class QtBaseModule(ExtensionModule):
raise MesonException(err_msg.format('MOC', f'uic-qt{self.qt_version}', self.qt_version))
if not (kwargs['headers'] or kwargs['sources']):
- raise build.InvalidArguments('At least one of the "headers" or "sources" keyword arguments must be provied and not empty')
+ raise build.InvalidArguments('At least one of the "headers" or "sources" keyword arguments must be provided and not empty')
inc = state.get_include_args(include_dirs=kwargs['include_directories'])
compile_args: T.List[str] = []
@@ -448,7 +448,7 @@ class QtBaseModule(ExtensionModule):
return output
- # We can't use typed_pos_args here, the signature is ambiguious
+ # We can't use typed_pos_args here, the signature is ambiguous
@typed_kwargs(
'qt.preprocess',
KwargInfo('sources', ContainerTypeInfo(list, (File, str)), listify=True, default=[], deprecated='0.59.0'),
diff --git a/mesonbuild/programs.py b/mesonbuild/programs.py
index 25a0642..48593cb 100644
--- a/mesonbuild/programs.py
+++ b/mesonbuild/programs.py
@@ -119,7 +119,7 @@ class ExternalProgram(mesonlib.HoldableObject):
@classmethod
def from_bin_list(cls, env: 'Environment', for_machine: MachineChoice, name: str) -> 'ExternalProgram':
# There is a static `for_machine` for this class because the binary
- # aways runs on the build platform. (It's host platform is our build
+ # always runs on the build platform. (It's host platform is our build
# platform.) But some external programs have a target platform, so this
# is what we are specifying here.
command = env.lookup_binary_entry(for_machine, name)
diff --git a/mesonbuild/scripts/cmd_or_ps.ps1 b/mesonbuild/scripts/cmd_or_ps.ps1
index ccef8e8..884d7e0 100644
--- a/mesonbuild/scripts/cmd_or_ps.ps1
+++ b/mesonbuild/scripts/cmd_or_ps.ps1
@@ -1,4 +1,4 @@
-# Copyied from GStreamer project
+# Copied from GStreamer project
# Author: Seungha Yang <seungha.yang@navercorp.com>
$i=1
diff --git a/mesonbuild/scripts/depfixer.py b/mesonbuild/scripts/depfixer.py
index 4e75536..df5056c 100644
--- a/mesonbuild/scripts/depfixer.py
+++ b/mesonbuild/scripts/depfixer.py
@@ -499,7 +499,7 @@ def fix_rpath(fname: str, rpath_dirs_to_remove: T.Set[bytes], new_rpath: T.Union
raise
# We don't look for this on import because it will do a useless PATH lookup
# on non-mac platforms. That can be expensive on some Windows machines
- # (upto 30ms), which is significant with --only-changed. For details, see:
+ # (up to 30ms), which is significant with --only-changed. For details, see:
# https://github.com/mesonbuild/meson/pull/6612#discussion_r378581401
if INSTALL_NAME_TOOL is False:
INSTALL_NAME_TOOL = bool(shutil.which('install_name_tool'))