aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/modules/gnome.py
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2022-01-11 23:47:53 -0500
committerDylan Baker <dylan@pnwbakers.com>2022-01-11 22:28:00 -0800
commit63593a55288ee5b89fc9c298dbc300f9c6adaba9 (patch)
tree951d7e3ab93b2974d02bf0621052a89330f85664 /mesonbuild/modules/gnome.py
parentbcfb4d0f46608db46cd8881e2a02ba6c33ff066e (diff)
downloadmeson-63593a55288ee5b89fc9c298dbc300f9c6adaba9.zip
meson-63593a55288ee5b89fc9c298dbc300f9c6adaba9.tar.gz
meson-63593a55288ee5b89fc9c298dbc300f9c6adaba9.tar.bz2
gnome.gdbus_codegen: allow File objects as XML file
As soon as we check for args[1] we declare it is of type FileOrString, and the additional ones specified in the `sources` kwarg explicitly allow this. It makes no sense to not accept it as the posarg too. Fixes building tracker-miners.
Diffstat (limited to 'mesonbuild/modules/gnome.py')
-rw-r--r--mesonbuild/modules/gnome.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
index 196f538..22242bb 100644
--- a/mesonbuild/modules/gnome.py
+++ b/mesonbuild/modules/gnome.py
@@ -1424,7 +1424,7 @@ class GnomeModule(ExtensionModule):
def gtkdoc_html_dir(self, state: 'ModuleState', args: T.Tuple[str], kwargs: 'TYPE_kwargs') -> str:
return os.path.join('share/gtk-doc/html', args[0])
- @typed_pos_args('gnome.gdbus_codegen', str, optargs=[str])
+ @typed_pos_args('gnome.gdbus_codegen', str, optargs=[(str, mesonlib.File)])
@typed_kwargs(
'gnome.gdbus_codegen',
_BUILD_BY_DEFAULT.evolve(since='0.40.0'),
@@ -1446,7 +1446,7 @@ class GnomeModule(ExtensionModule):
'autocleanup', str, default='default', since='0.47.0',
validator=in_set_validator({'all', 'none', 'objects'})),
)
- def gdbus_codegen(self, state: 'ModuleState', args: T.Tuple[str, T.Optional[str]],
+ def gdbus_codegen(self, state: 'ModuleState', args: T.Tuple[str, T.Optional['FileOrString']],
kwargs: 'GdbusCodegen') -> ModuleReturnValue:
namebase = args[0]
xml_files: T.List['FileOrString'] = [args[1]] if args[1] else []