aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
authorWolfgang Stöggl <c72578@yahoo.de>2019-11-06 14:49:00 +0100
committerMichael Hirsch, Ph.D <10931741+scivision@users.noreply.github.com>2019-11-06 09:55:30 -0500
commitf037e7ef4538b37625c0893d32cad36e72648c8a (patch)
tree90c594eac530b600ac64168e50f2f8a298ebff56 /mesonbuild
parentf56ef583d3c8ecda7725ca04b48011c9081a7349 (diff)
downloadmeson-f037e7ef4538b37625c0893d32cad36e72648c8a.zip
meson-f037e7ef4538b37625c0893d32cad36e72648c8a.tar.gz
meson-f037e7ef4538b37625c0893d32cad36e72648c8a.tar.bz2
Fix typos found by codespell
- Typos were found by codespell v1.16.0
Diffstat (limited to 'mesonbuild')
-rw-r--r--mesonbuild/ast/interpreter.py2
-rw-r--r--mesonbuild/ast/introspection.py4
-rw-r--r--mesonbuild/backend/ninjabackend.py2
-rwxr-xr-xmesonbuild/cmake/data/run_ctgt.py6
-rw-r--r--mesonbuild/cmake/fileapi.py4
-rw-r--r--mesonbuild/cmake/interpreter.py10
-rw-r--r--mesonbuild/cmake/traceparser.py4
-rw-r--r--mesonbuild/compilers/compilers.py2
-rw-r--r--mesonbuild/compilers/cpp.py2
-rw-r--r--mesonbuild/compilers/cuda.py4
-rw-r--r--mesonbuild/compilers/mixins/emscripten.py2
-rw-r--r--mesonbuild/compilers/mixins/visualstudio.py2
-rw-r--r--mesonbuild/coredata.py4
-rw-r--r--mesonbuild/dependencies/base.py4
-rw-r--r--mesonbuild/dependencies/dev.py6
-rw-r--r--mesonbuild/envconfig.py2
-rw-r--r--mesonbuild/environment.py6
-rw-r--r--mesonbuild/interpreter.py2
-rw-r--r--mesonbuild/interpreterbase.py4
-rw-r--r--mesonbuild/linkers.py2
-rw-r--r--mesonbuild/mconf.py2
-rw-r--r--mesonbuild/mesonlib.py8
-rw-r--r--mesonbuild/mesonmain.py10
-rw-r--r--mesonbuild/mintro.py2
-rw-r--r--mesonbuild/mlog.py2
-rw-r--r--mesonbuild/modules/cmake.py2
-rw-r--r--mesonbuild/modules/gnome.py2
-rw-r--r--mesonbuild/modules/unstable_simd.py2
-rw-r--r--mesonbuild/mtest.py2
-rw-r--r--mesonbuild/munstable_coredata.py2
-rw-r--r--mesonbuild/rewriter.py12
31 files changed, 60 insertions, 60 deletions
diff --git a/mesonbuild/ast/interpreter.py b/mesonbuild/ast/interpreter.py
index 4d810fc..847f817 100644
--- a/mesonbuild/ast/interpreter.py
+++ b/mesonbuild/ast/interpreter.py
@@ -289,7 +289,7 @@ class AstInterpreter(interpreterbase.InterpreterBase):
l = quick_resolve(node.left)
r = quick_resolve(node.right)
if isinstance(l, str) and isinstance(r, str):
- result = l + r # String concatination detected
+ result = l + r # String concatenation detected
else:
result = self.flatten_args(l, include_unknown_args, id_loop_detect) + self.flatten_args(r, include_unknown_args, id_loop_detect)
diff --git a/mesonbuild/ast/introspection.py b/mesonbuild/ast/introspection.py
index aeb0400..eb9517c 100644
--- a/mesonbuild/ast/introspection.py
+++ b/mesonbuild/ast/introspection.py
@@ -35,7 +35,7 @@ class IntrospectionHelper:
class IntrospectionInterpreter(AstInterpreter):
# Interpreter to detect the options without a build directory
- # Most of the code is stolen from interperter.Interpreter
+ # Most of the code is stolen from interpreter.Interpreter
def __init__(self, source_root, subdir, backend, visitors=None, cross_file=None, subproject='', subproject_dir='subprojects', env=None):
visitors = visitors if visitors is not None else []
super().__init__(source_root, subdir, visitors=visitors)
@@ -161,7 +161,7 @@ class IntrospectionInterpreter(AstInterpreter):
name = args[0]
srcqueue = [node]
- # Process the soruces BEFORE flattening the kwargs, to preserve the original nodes
+ # Process the sources BEFORE flattening the kwargs, to preserve the original nodes
if 'sources' in kwargs:
srcqueue += mesonlib.listify(kwargs['sources'])
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
index 985b910..49fb312 100644
--- a/mesonbuild/backend/ninjabackend.py
+++ b/mesonbuild/backend/ninjabackend.py
@@ -165,7 +165,7 @@ class NinjaBuildElement:
# This is the only way I could find to make this work on all
# platforms including Windows command shell. Slash is a dir separator
# on Windows, too, so all characters are unambiguous and, more importantly,
- # do not require quoting, unless explicitely specified, which is necessary for
+ # do not require quoting, unless explicitly specified, which is necessary for
# the csc compiler.
line = line.replace('\\', '/')
outfile.write(line)
diff --git a/mesonbuild/cmake/data/run_ctgt.py b/mesonbuild/cmake/data/run_ctgt.py
index 0a9b80d..4e85b86 100755
--- a/mesonbuild/cmake/data/run_ctgt.py
+++ b/mesonbuild/cmake/data/run_ctgt.py
@@ -7,14 +7,14 @@ import os
import sys
commands = [[]]
-SEPERATOR = ';;;'
+SEPARATOR = ';;;'
# Generate CMD parameters
parser = argparse.ArgumentParser(description='Wrapper for add_custom_command')
parser.add_argument('-d', '--directory', type=str, metavar='D', required=True, help='Working directory to cwd to')
parser.add_argument('-o', '--outputs', nargs='+', metavar='O', required=True, help='Expected output files')
parser.add_argument('-O', '--original-outputs', nargs='+', metavar='O', required=True, help='Output files expected by CMake')
-parser.add_argument('commands', nargs=argparse.REMAINDER, help='A "{}" seperated list of commands'.format(SEPERATOR))
+parser.add_argument('commands', nargs=argparse.REMAINDER, help='A "{}" separated list of commands'.format(SEPARATOR))
# Parse
args = parser.parse_args()
@@ -24,7 +24,7 @@ if len(args.outputs) != len(args.original_outputs):
sys.exit(1)
for i in args.commands:
- if i == SEPERATOR:
+ if i == SEPARATOR:
commands += [[]]
continue
diff --git a/mesonbuild/cmake/fileapi.py b/mesonbuild/cmake/fileapi.py
index df7c73a..5ee6ad0 100644
--- a/mesonbuild/cmake/fileapi.py
+++ b/mesonbuild/cmake/fileapi.py
@@ -155,7 +155,7 @@ class CMakeFileAPI:
link_flags += [i['fragment']]
# TODO The `dependencies` entry is new in the file API.
- # maybe we can make use of that in addtion to the
+ # maybe we can make use of that in addition to the
# implicit dependency detection
tgt_data = {
'artifacts': [x.get('path', '') for x in tgt.get('artifacts', [])],
@@ -175,7 +175,7 @@ class CMakeFileAPI:
processed_src_idx = []
for cg in tgt.get('compileGroups', []):
# Again, why an array, when there is usually only one element
- # and arguments are seperated with spaces...
+ # and arguments are separated with spaces...
flags = []
for i in cg.get('compileCommandFragments', []):
flags += [i['fragment']]
diff --git a/mesonbuild/cmake/interpreter.py b/mesonbuild/cmake/interpreter.py
index 1c672be..3e20dd6 100644
--- a/mesonbuild/cmake/interpreter.py
+++ b/mesonbuild/cmake/interpreter.py
@@ -404,7 +404,7 @@ class ConverterCustomTarget:
# Modify the original outputs if they are relative. Again,
# relative paths are relative to ${CMAKE_CURRENT_BINARY_DIR}
- # and the first disclaimer is stil in effect
+ # and the first disclaimer is still in effect
def ensure_absolute(x: str):
if os.path.isabs(x):
return x
@@ -562,9 +562,9 @@ class CMakeInterpreter:
raise CMakeException('Failed to configure the CMake subproject')
def initialise(self, extra_cmake_options: List[str]) -> None:
- # Run configure the old way becuse doing it
+ # Run configure the old way because doing it
# with the server doesn't work for some reason
- # Aditionally, the File API requires a configure anyway
+ # Additionally, the File API requires a configure anyway
self.configure(extra_cmake_options)
# Continue with the file API If supported
@@ -869,7 +869,7 @@ class CMakeInterpreter:
def process_custom_target(tgt: ConverterCustomTarget) -> None:
# CMake allows to specify multiple commands in a custom target.
# To map this to meson, a helper script is used to execute all
- # commands in order. This addtionally allows setting the working
+ # commands in order. This additionally allows setting the working
# directory.
tgt_var = tgt.name # type: str
@@ -893,7 +893,7 @@ class CMakeInterpreter:
command += ['-O'] + tgt.original_outputs
command += ['-d', tgt.working_dir]
- # Generate the commands. Subcommands are seperated by ';;;'
+ # Generate the commands. Subcommands are separated by ';;;'
for cmd in tgt.command:
command += [resolve_source(x) for x in cmd] + [';;;']
diff --git a/mesonbuild/cmake/traceparser.py b/mesonbuild/cmake/traceparser.py
index 4d68924..7daef0b 100644
--- a/mesonbuild/cmake/traceparser.py
+++ b/mesonbuild/cmake/traceparser.py
@@ -499,11 +499,11 @@ class CMakeTraceParser:
if curr_str is None:
curr_str = i
elif os.path.isfile(curr_str):
- # Abort concatination if curr_str is an existing file
+ # Abort concatenation if curr_str is an existing file
fixed_list += [curr_str]
curr_str = i
elif not reg_start.match(curr_str):
- # Abort concatination if curr_str no longer matches the regex
+ # Abort concatenation if curr_str no longer matches the regex
fixed_list += [curr_str]
curr_str = i
elif reg_end.match(i) or os.path.exists('{} {}'.format(curr_str, i)):
diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py
index 51ff55d..4623497 100644
--- a/mesonbuild/compilers/compilers.py
+++ b/mesonbuild/compilers/compilers.py
@@ -554,7 +554,7 @@ class CompilerArgs(list):
default_dirs = self.compiler.get_default_include_dirs()
bad_idx_list = []
for i, each in enumerate(new):
- # Remove the -isystem and the path if the path is a dafault path
+ # Remove the -isystem and the path if the path is a default path
if (each == '-isystem' and
i < (len(new) - 1) and
new[i + 1] in default_dirs):
diff --git a/mesonbuild/compilers/cpp.py b/mesonbuild/compilers/cpp.py
index 973ffbb..67a26dc 100644
--- a/mesonbuild/compilers/cpp.py
+++ b/mesonbuild/compilers/cpp.py
@@ -552,7 +552,7 @@ class IntelClCPPCompiler(VisualStudioLikeCPPCompilerMixin, IntelVisualStudioLike
IntelVisualStudioLikeCompiler.__init__(self, target)
def get_options(self):
- # This has only been tested with verison 19.0,
+ # This has only been tested with version 19.0,
cpp_stds = ['none', 'c++11', 'vc++11', 'c++14', 'vc++14', 'c++17', 'vc++17', 'c++latest']
return self._get_options_impl(super().get_options(), cpp_stds)
diff --git a/mesonbuild/compilers/cuda.py b/mesonbuild/compilers/cuda.py
index 088a7e7..4ca8f4e 100644
--- a/mesonbuild/compilers/cuda.py
+++ b/mesonbuild/compilers/cuda.py
@@ -157,7 +157,7 @@ class CudaCompiler(Compiler):
raise EnvironmentException('Executables created by {0} compiler {1} are not runnable.'.format(self.language, self.name_string()))
# Interpret the result of the sanity test.
- # As mentionned above, it is not only a sanity test but also a GPU
+ # As mentioned above, it is not only a sanity test but also a GPU
# architecture detection test.
if stde == '':
self.detected_cc = stdo
@@ -191,7 +191,7 @@ class CudaCompiler(Compiler):
def get_option_compile_args(self, options):
args = []
# On Windows, the version of the C++ standard used by nvcc is dictated by
- # the combination of CUDA version and MSVC verion; the --std= is thus ignored
+ # the combination of CUDA version and MSVC version; the --std= is thus ignored
# and attempting to use it will result in a warning: https://stackoverflow.com/a/51272091/741027
if not is_windows():
std = options['cuda_std']
diff --git a/mesonbuild/compilers/mixins/emscripten.py b/mesonbuild/compilers/mixins/emscripten.py
index 4797cbc..98513e5 100644
--- a/mesonbuild/compilers/mixins/emscripten.py
+++ b/mesonbuild/compilers/mixins/emscripten.py
@@ -37,7 +37,7 @@ class EmscriptenMixin:
if mode == 'preprocess':
return None
# Unlike sane toolchains, emcc infers the kind of output from its name.
- # This is the only reason why this method is overriden; compiler tests
+ # This is the only reason why this method is overridden; compiler tests
# do not work well with the default exe/obj suffices.
if mode == 'link':
suffix = 'js'
diff --git a/mesonbuild/compilers/mixins/visualstudio.py b/mesonbuild/compilers/mixins/visualstudio.py
index ebf51ff..60b07c4 100644
--- a/mesonbuild/compilers/mixins/visualstudio.py
+++ b/mesonbuild/compilers/mixins/visualstudio.py
@@ -83,7 +83,7 @@ class VisualStudioLikeCompiler(metaclass=abc.ABCMeta):
A number of compilers attempt to mimic MSVC, with varying levels of
success, such as Clang-CL and ICL (the Intel C/C++ Compiler for Windows).
- This classs implements as much common logic as possible.
+ This class implements as much common logic as possible.
"""
std_warn_args = ['/W3']
diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py
index 23701d7..05cde4d 100644
--- a/mesonbuild/coredata.py
+++ b/mesonbuild/coredata.py
@@ -124,7 +124,7 @@ class UserIntegerOption(UserOption[int]):
try:
return int(valuestring)
except ValueError:
- raise MesonException('Value string "%s" is not convertable to an integer.' % valuestring)
+ raise MesonException('Value string "%s" is not convertible to an integer.' % valuestring)
class UserUmaskOption(UserIntegerOption, UserOption[Union[str, int]]):
def __init__(self, description, value, yielding=None):
@@ -412,7 +412,7 @@ class CoreData:
real.append(copy)
# Also replace the command line argument, as the pipe
- # probably wont exist on reconfigure
+ # probably won't exist on reconfigure
filenames[i] = copy
continue
if sys.platform != 'win32':
diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py
index 201b53f..032672d 100644
--- a/mesonbuild/dependencies/base.py
+++ b/mesonbuild/dependencies/base.py
@@ -197,7 +197,7 @@ class Dependency:
"""Create a new dependency that contains part of the parent dependency.
The following options can be inherited:
- links -- all link_with arguemnts
+ links -- all link_with arguments
includes -- all include_directory and -I/-isystem calls
sources -- any source, header, or generated sources
compile_args -- any compile args
@@ -450,7 +450,7 @@ class ConfigToolDependency(ExternalDependency):
return cls.__new__(cls)
def find_config(self, versions=None):
- """Helper method that searchs for config tool binaries in PATH and
+ """Helper method that searches for config tool binaries in PATH and
returns the one that best matches the given version requirements.
"""
if not isinstance(versions, list) and versions is not None:
diff --git a/mesonbuild/dependencies/dev.py b/mesonbuild/dependencies/dev.py
index 6288739..894bfdc 100644
--- a/mesonbuild/dependencies/dev.py
+++ b/mesonbuild/dependencies/dev.py
@@ -33,7 +33,7 @@ from typing import List, Tuple
def get_shared_library_suffix(environment, for_machine: MachineChoice):
- """This is only gauranteed to work for languages that compile to machine
+ """This is only guaranteed to work for languages that compile to machine
code, not for languages like C# that use a bytecode and always end in .dll
"""
m = environment.machines[for_machine]
@@ -292,7 +292,7 @@ class LLVMDependencyConfigTool(ConfigToolDependency):
if not self.static and mode == 'static':
# If llvm is configured with LLVM_BUILD_LLVM_DYLIB but not with
# LLVM_LINK_LLVM_DYLIB and not LLVM_BUILD_SHARED_LIBS (which
- # upstreams doesn't recomend using), then llvm-config will lie to
+ # upstream doesn't recommend using), then llvm-config will lie to
# you about how to do shared-linking. It wants to link to a a bunch
# of individual shared libs (which don't exist because llvm wasn't
# built with LLVM_BUILD_SHARED_LIBS.
@@ -305,7 +305,7 @@ class LLVMDependencyConfigTool(ConfigToolDependency):
except DependencyException:
lib_ext = get_shared_library_suffix(environment, self.for_machine)
libdir = self.get_config_value(['--libdir'], 'link_args')[0]
- # Sort for reproducability
+ # Sort for reproducibility
matches = sorted(glob.iglob(os.path.join(libdir, 'libLLVM*{}'.format(lib_ext))))
if not matches:
if self.required:
diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py
index 716ee91..1adb08d 100644
--- a/mesonbuild/envconfig.py
+++ b/mesonbuild/envconfig.py
@@ -350,7 +350,7 @@ This is probably wrong, it should always point to the native compiler.''' % evar
First tries looking in explicit map, then tries environment variable.
"""
- # Try explict map, don't fall back on env var
+ # Try explicit map, don't fall back on env var
command = self.binaries.get(name)
if command is not None:
command = mesonlib.stringlistify(command)
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
index fccca16..5f3c25f 100644
--- a/mesonbuild/environment.py
+++ b/mesonbuild/environment.py
@@ -771,7 +771,7 @@ class Environment:
will be appended. This means that if a space is required (such as
with swift which wants `-Xlinker --version` and *not*
`-Xlinker=--version`) you must pass as a list.
- :extra_args: Any addtional arguments rquired (such as a source file)
+ :extra_args: Any additional arguments required (such as a source file)
"""
extra_args = typing.cast(typing.List[str], extra_args or [])
if isinstance(prefix, str):
@@ -1316,7 +1316,7 @@ class Environment:
# figure out what linker rustc is using for a non-nightly compiler
# (On nightly you can pass -Z print-link-args). So we're going to
# hard code the linker based on the platform.
- # Currenty gnu ld is used for everything except apple by
+ # Currently gnu ld is used for everything except apple by
# default, and apple ld is used on mac.
# TODO: find some better way to figure this out.
if self.machines[for_machine].is_darwin():
@@ -1376,7 +1376,7 @@ class Environment:
linker = MSVCDynamicLinker(for_machine, version=version)
else:
# Getting LDC on windows to give useful linker output when not
- # doing real work is painfully hard. It ships with a verison of
+ # doing real work is painfully hard. It ships with a version of
# lld-link, so just assume that we're going to use lld-link
# with it.
_, o, _ = Popen_safe(['lld-link.exe', '--version'])
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py
index cd38d40..6f1f0a7 100644
--- a/mesonbuild/interpreter.py
+++ b/mesonbuild/interpreter.py
@@ -2111,7 +2111,7 @@ class Interpreter(InterpreterBase):
# Re-initialize machine descriptions. We can do a better job now because we
# have the compilers needed to gain more knowledge, so wipe out old
- # inferrence and start over.
+ # inference and start over.
machines = self.build.environment.machines.miss_defaulting()
machines.build = environment.detect_machine_info(self.coredata.compilers.build)
self.build.environment.machines = machines.default_missing()
diff --git a/mesonbuild/interpreterbase.py b/mesonbuild/interpreterbase.py
index abb4696..0bea05b 100644
--- a/mesonbuild/interpreterbase.py
+++ b/mesonbuild/interpreterbase.py
@@ -243,7 +243,7 @@ class FeatureNew(FeatureCheckBase):
return 'Project specifies a minimum meson_version \'{}\' but uses features which were added in newer versions:'.format(tv)
def log_usage_warning(self, tv):
- mlog.warning('Project targetting \'{}\' but tried to use feature introduced '
+ mlog.warning('Project targeting \'{}\' but tried to use feature introduced '
'in \'{}\': {}'.format(tv, self.feature_version, self.feature_name))
class FeatureDeprecated(FeatureCheckBase):
@@ -258,7 +258,7 @@ class FeatureDeprecated(FeatureCheckBase):
return 'Deprecated features used:'
def log_usage_warning(self, tv):
- mlog.deprecation('Project targetting \'{}\' but tried to use feature '
+ mlog.deprecation('Project targeting \'{}\' but tried to use feature '
'deprecated since \'{}\': {}'
''.format(tv, self.feature_version, self.feature_name))
diff --git a/mesonbuild/linkers.py b/mesonbuild/linkers.py
index f2fb063..6ca7c03 100644
--- a/mesonbuild/linkers.py
+++ b/mesonbuild/linkers.py
@@ -161,7 +161,7 @@ class ArmarLinker(ArLinker):
self.std_args = ['-csr']
def can_linker_accept_rsp(self) -> bool:
- # armar cann't accept arguments using the @rsp syntax
+ # armar can't accept arguments using the @rsp syntax
return False
diff --git a/mesonbuild/mconf.py b/mesonbuild/mconf.py
index 94393d1..cadc1f5 100644
--- a/mesonbuild/mconf.py
+++ b/mesonbuild/mconf.py
@@ -62,7 +62,7 @@ class Conf:
self.source_dir = os.path.abspath(os.path.realpath(self.build_dir))
intr = mintro.IntrospectionInterpreter(self.source_dir, '', 'ninja', visitors = [AstIDGenerator()])
intr.analyze()
- # Reenable logging just in case
+ # Re-enable logging just in case
mlog.enable()
self.coredata = intr.coredata
self.default_values_only = True
diff --git a/mesonbuild/mesonlib.py b/mesonbuild/mesonlib.py
index d289ff2..122d7ff 100644
--- a/mesonbuild/mesonlib.py
+++ b/mesonbuild/mesonlib.py
@@ -398,7 +398,7 @@ class PerMachineDefaultable(PerMachine[typing.Optional[_T]]):
super().__init__(None, None)
def default_missing(self) -> "PerMachine[typing.Optional[_T]]":
- """Default host to buid
+ """Default host to build
This allows just specifying nothing in the native case, and just host in the
cross non-compiler case.
@@ -416,7 +416,7 @@ class PerThreeMachineDefaultable(PerMachineDefaultable, PerThreeMachine[typing.O
PerThreeMachine.__init__(self, None, None, None)
def default_missing(self) -> "PerThreeMachine[typing.Optional[_T]]":
- """Default host to buid and target to host.
+ """Default host to build and target to host.
This allows just specifying nothing in the native case, just host in the
cross non-compiler case, and just target in the native-built
@@ -688,9 +688,9 @@ def default_prefix():
def get_library_dirs() -> typing.List[str]:
if is_windows():
- return ['C:/mingw/lib'] # TODO: get programatically
+ return ['C:/mingw/lib'] # TODO: get programmatically
if is_osx():
- return ['/usr/lib'] # TODO: get programatically
+ return ['/usr/lib'] # TODO: get programmatically
# The following is probably Debian/Ubuntu specific.
# /usr/local/lib is first because it contains stuff
# installed by the sysadmin and is probably more up-to-date
diff --git a/mesonbuild/mesonmain.py b/mesonbuild/mesonmain.py
index 06214ad..6ec9682 100644
--- a/mesonbuild/mesonmain.py
+++ b/mesonbuild/mesonmain.py
@@ -33,11 +33,11 @@ from .wrap import wraptool
class CommandLineParser:
def __init__(self):
self.term_width = shutil.get_terminal_size().columns
- self.formater = lambda prog: argparse.HelpFormatter(prog, max_help_position=int(self.term_width / 2), width=self.term_width)
+ self.formatter = lambda prog: argparse.HelpFormatter(prog, max_help_position=int(self.term_width / 2), width=self.term_width)
self.commands = {}
self.hidden_commands = []
- self.parser = argparse.ArgumentParser(prog='meson', formatter_class=self.formater)
+ self.parser = argparse.ArgumentParser(prog='meson', formatter_class=self.formatter)
self.subparsers = self.parser.add_subparsers(title='Commands',
description='If no command is specified it defaults to setup command.')
self.add_command('setup', msetup.add_arguments, msetup.run,
@@ -60,7 +60,7 @@ class CommandLineParser:
help_msg='Manage subprojects')
self.add_command('help', self.add_help_arguments, self.run_help_command,
help_msg='Print help of a subcommand')
- self.add_command('rewrite', lambda parser: rewriter.add_arguments(parser, self.formater), rewriter.run,
+ self.add_command('rewrite', lambda parser: rewriter.add_arguments(parser, self.formatter), rewriter.run,
help_msg='Modify the project definition')
# Hidden commands
@@ -74,10 +74,10 @@ class CommandLineParser:
# FIXME: Cannot have hidden subparser:
# https://bugs.python.org/issue22848
if help_msg == argparse.SUPPRESS:
- p = argparse.ArgumentParser(prog='meson ' + name, formatter_class=self.formater)
+ p = argparse.ArgumentParser(prog='meson ' + name, formatter_class=self.formatter)
self.hidden_commands.append(name)
else:
- p = self.subparsers.add_parser(name, help=help_msg, aliases=aliases, formatter_class=self.formater)
+ p = self.subparsers.add_parser(name, help=help_msg, aliases=aliases, formatter_class=self.formatter)
add_arguments_func(p)
p.set_defaults(run_func=run_func)
for i in [name] + aliases:
diff --git a/mesonbuild/mintro.py b/mesonbuild/mintro.py
index 5e05574..b95a224 100644
--- a/mesonbuild/mintro.py
+++ b/mesonbuild/mintro.py
@@ -388,7 +388,7 @@ def run(options):
backend = backends.get_backend_from_name(options.backend, None)
intr = IntrospectionInterpreter(sourcedir, '', backend.name, visitors = [AstIDGenerator(), AstIndentationGenerator(), AstConditionLevel()])
intr.analyze()
- # Reenable logging just in case
+ # Re-enable logging just in case
mlog.enable()
for key, val in intro_types.items():
if (not options.all and not getattr(options, key, False)) or 'no_bd' not in val:
diff --git a/mesonbuild/mlog.py b/mesonbuild/mlog.py
index 692a689..416e683 100644
--- a/mesonbuild/mlog.py
+++ b/mesonbuild/mlog.py
@@ -164,7 +164,7 @@ def force_print(*args: str, **kwargs: Any) -> None:
cleaned = raw.encode('ascii', 'replace').decode('ascii')
print(cleaned, end='')
-# We really want a heterogenous dict for this, but that's in typing_extensions
+# We really want a heterogeneous dict for this, but that's in typing_extensions
def debug(*args: Union[str, AnsiDecorator], **kwargs: Any) -> None:
arr = process_markup(args, False)
if log_file is not None:
diff --git a/mesonbuild/modules/cmake.py b/mesonbuild/modules/cmake.py
index 2701f35..21f144f 100644
--- a/mesonbuild/modules/cmake.py
+++ b/mesonbuild/modules/cmake.py
@@ -138,7 +138,7 @@ class CmakeModule(ExtensionModule):
cmakebin = dependencies.ExternalProgram('cmake', silent=False)
p, stdout, stderr = mesonlib.Popen_safe(cmakebin.get_command() + ['--system-information', '-G', 'Ninja'])[0:3]
if p.returncode != 0:
- mlog.log('error retrieving cmake informations: returnCode={0} stdout={1} stderr={2}'.format(p.returncode, stdout, stderr))
+ mlog.log('error retrieving cmake information: returnCode={0} stdout={1} stderr={2}'.format(p.returncode, stdout, stderr))
return False
match = re.search('\nCMAKE_ROOT \\"([^"]+)"\n', stdout.strip())
diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
index bcf77b9..9bd7a99 100644
--- a/mesonbuild/modules/gnome.py
+++ b/mesonbuild/modules/gnome.py
@@ -47,7 +47,7 @@ native_glib_version = None
def gir_has_option(intr_obj, option):
try:
g_ir_scanner = intr_obj.find_program_impl('g-ir-scanner')
- # Handle overriden g-ir-scanner
+ # Handle overridden g-ir-scanner
if isinstance(getattr(g_ir_scanner, "held_object", g_ir_scanner), interpreter.OverrideProgram):
assert option in ['--extra-library', '--sources-top-dirs']
return True
diff --git a/mesonbuild/modules/unstable_simd.py b/mesonbuild/modules/unstable_simd.py
index 2f2f67f..4c066fb 100644
--- a/mesonbuild/modules/unstable_simd.py
+++ b/mesonbuild/modules/unstable_simd.py
@@ -60,7 +60,7 @@ class SimdModule(ExtensionModule):
for iset in self.isets:
if iset not in kwargs:
continue
- iset_fname = kwargs[iset] # Migth also be an array or Files. static_library will validate.
+ iset_fname = kwargs[iset] # Might also be an array or Files. static_library will validate.
args = compiler.get_instruction_set_args(iset)
if args is None:
mlog.log('Compiler supports %s:' % iset, mlog.red('NO'))
diff --git a/mesonbuild/mtest.py b/mesonbuild/mtest.py
index d112d1f..1f52eda 100644
--- a/mesonbuild/mtest.py
+++ b/mesonbuild/mtest.py
@@ -818,7 +818,7 @@ Timeout: %4d
# project_name:suite_name
# so we need to select only the test belonging to project_name
- # this if hanlde the first case (i.e., SUITE == suite_name)
+ # this if handle the first case (i.e., SUITE == suite_name)
# in this way we can run tests belonging to different
# (sub)projects which share the same suite_name
diff --git a/mesonbuild/munstable_coredata.py b/mesonbuild/munstable_coredata.py
index 8821399..5463f16 100644
--- a/mesonbuild/munstable_coredata.py
+++ b/mesonbuild/munstable_coredata.py
@@ -79,7 +79,7 @@ def run(options):
if all_backends or backend.startswith('vs'):
print('Meson command used in build file regeneration: ' + ' '.join(v))
elif k == 'pkgconf_envvar':
- print('Last seen PKGCONFIG enviroment variable value: ' + v)
+ print('Last seen PKGCONFIG environment variable value: ' + v)
elif k == 'version':
print('Meson version: ' + v)
elif k == 'cross_files':
diff --git a/mesonbuild/rewriter.py b/mesonbuild/rewriter.py
index e700718..9bb98cf 100644
--- a/mesonbuild/rewriter.py
+++ b/mesonbuild/rewriter.py
@@ -34,14 +34,14 @@ import json, os, re, sys
class RewriterException(MesonException):
pass
-def add_arguments(parser, formater=None):
+def add_arguments(parser, formatter=None):
parser.add_argument('-s', '--sourcedir', type=str, default='.', metavar='SRCDIR', help='Path to source directory.')
parser.add_argument('-V', '--verbose', action='store_true', default=False, help='Enable verbose output')
parser.add_argument('-S', '--skip-errors', dest='skip', action='store_true', default=False, help='Skip errors instead of aborting')
subparsers = parser.add_subparsers(dest='type', title='Rewriter commands', description='Rewrite command to execute')
# Target
- tgt_parser = subparsers.add_parser('target', help='Modify a target', formatter_class=formater)
+ tgt_parser = subparsers.add_parser('target', help='Modify a target', formatter_class=formatter)
tgt_parser.add_argument('-s', '--subdir', default='', dest='subdir', help='Subdirectory of the new target (only for the "add_target" action)')
tgt_parser.add_argument('--type', dest='tgt_type', choices=rewriter_keys['target']['target_type'][2], default='executable',
help='Type of the target to add (only for the "add_target" action)')
@@ -51,7 +51,7 @@ def add_arguments(parser, formater=None):
tgt_parser.add_argument('sources', nargs='*', help='Sources to add/remove')
# KWARGS
- kw_parser = subparsers.add_parser('kwargs', help='Modify keyword arguments', formatter_class=formater)
+ kw_parser = subparsers.add_parser('kwargs', help='Modify keyword arguments', formatter_class=formatter)
kw_parser.add_argument('operation', choices=rewriter_keys['kwargs']['operation'][2],
help='Action to execute')
kw_parser.add_argument('function', choices=list(rewriter_func_kwargs.keys()),
@@ -60,13 +60,13 @@ def add_arguments(parser, formater=None):
kw_parser.add_argument('kwargs', nargs='*', help='Pairs of keyword and value')
# Default options
- def_parser = subparsers.add_parser('default-options', help='Modify the project default options', formatter_class=formater)
+ def_parser = subparsers.add_parser('default-options', help='Modify the project default options', formatter_class=formatter)
def_parser.add_argument('operation', choices=rewriter_keys['default_options']['operation'][2],
help='Action to execute')
def_parser.add_argument('options', nargs='*', help='Key, value pairs of configuration option')
# JSON file/command
- cmd_parser = subparsers.add_parser('command', help='Execute a JSON array of commands', formatter_class=formater)
+ cmd_parser = subparsers.add_parser('command', help='Execute a JSON array of commands', formatter_class=formatter)
cmd_parser.add_argument('json', help='JSON string or file to execute')
class RequiredKeys:
@@ -882,7 +882,7 @@ def list_to_dict(in_list: List[str]) -> Dict[str, str]:
try:
for i in it:
# calling next(it) is not a mistake, we're taking the next element from
- # the iterator, avoiding te need to preprocess it into a sequence of
+ # the iterator, avoiding the need to preprocess it into a sequence of
# key value pairs.
result[i] = next(it)
except StopIteration: