aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/modules
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2021-12-04 21:33:33 -0800
committerEli Schwartz <eschwartz93@gmail.com>2022-01-18 21:58:24 -0500
commita848dd3cce070a8d3b7c698704c6042c9431bdfe (patch)
tree610e4c807c86867608c8f4f96befd439b3e5069b /mesonbuild/modules
parentfcf78ceb7b33c6ae32cd3e5a3aae4cc048d14ea9 (diff)
downloadmeson-a848dd3cce070a8d3b7c698704c6042c9431bdfe.zip
meson-a848dd3cce070a8d3b7c698704c6042c9431bdfe.tar.gz
meson-a848dd3cce070a8d3b7c698704c6042c9431bdfe.tar.bz2
modules/gnome: fix issues with _make_gir_target
Diffstat (limited to 'mesonbuild/modules')
-rw-r--r--mesonbuild/modules/gnome.py18
1 files changed, 13 insertions, 5 deletions
diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
index 1932695..edb38f6 100644
--- a/mesonbuild/modules/gnome.py
+++ b/mesonbuild/modules/gnome.py
@@ -30,7 +30,7 @@ from .. import build
from .. import interpreter
from .. import mesonlib
from .. import mlog
-from ..build import BuildTarget, CustomTarget, CustomTargetIndex, GeneratedList, InvalidArguments
+from ..build import BuildTarget, CustomTarget, CustomTargetIndex, Executable, GeneratedList, InvalidArguments
from ..dependencies import Dependency, PkgConfigDependency, InternalDependency
from ..interpreter.type_checking import DEPENDS_KW, DEPEND_FILES_KW, INSTALL_KW, NoneType, in_set_validator
from ..interpreterbase import noPosargs, noKwargs, FeatureNew, FeatureDeprecated
@@ -896,9 +896,14 @@ class GnomeModule(ExtensionModule):
return gir_filelist_filename
- def _make_gir_target(self, state: 'ModuleState', girfile: str, scan_command: T.List[str],
- generated_files: T.Sequence[T.Union[str, mesonlib.File, build.CustomTarget, build.CustomTargetIndex, build.GeneratedList]],
- depends: T.List[build.Target], kwargs: T.Dict[str, T.Any]) -> GirTarget:
+ def _make_gir_target(
+ self,
+ state: 'ModuleState',
+ girfile: str,
+ scan_command: T.Sequence[T.Union['FileOrString', Executable, ExternalProgram, OverrideProgram]],
+ generated_files: T.Sequence[T.Union[str, mesonlib.File, build.CustomTarget, build.CustomTargetIndex, build.GeneratedList]],
+ depends: T.Sequence[T.Union['FileOrString', build.BuildTarget, 'build.GeneratedTypes']],
+ kwargs: T.Dict[str, T.Any]) -> GirTarget:
install = kwargs['install_gir']
if install is None:
install = kwargs['install']
@@ -1125,7 +1130,10 @@ class GnomeModule(ExtensionModule):
generated_files = [f for f in libsources if isinstance(f, (GeneratedList, CustomTarget, CustomTargetIndex))]
- scan_target = self._make_gir_target(state, girfile, scan_command, generated_files, depends, kwargs)
+ scan_target = self._make_gir_target(
+ state, girfile, scan_command, generated_files, depends,
+ # We have to cast here because mypy can't figure this out
+ T.cast(T.Dict[str, T.Any], kwargs))
typelib_output = f'{ns}-{nsversion}.typelib'
typelib_cmd = [gicompiler, scan_target, '--output', '@OUTPUT@']