diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2021-11-30 16:19:25 -0500 |
---|---|---|
committer | Eli Schwartz <eschwartz@archlinux.org> | 2021-12-06 20:59:45 -0500 |
commit | bc8c938148a55910dd1bd454fc3c5e8ab7477baa (patch) | |
tree | 615e23242656d5baaa1ec5e1177c84b0e7922bb6 /mesonbuild/modules/gnome.py | |
parent | bed55a902c46ad0fb1330a19daaa9834a37d3336 (diff) | |
download | meson-bc8c938148a55910dd1bd454fc3c5e8ab7477baa.zip meson-bc8c938148a55910dd1bd454fc3c5e8ab7477baa.tar.gz meson-bc8c938148a55910dd1bd454fc3c5e8ab7477baa.tar.bz2 |
gnome module: deprecate passing false to install_dir_gir
Use a proper install option for this. Now `install_<type>` can directly
override `install` instead of passing a boolean to the string kwarg
`install_dir_<type>`.
Diffstat (limited to 'mesonbuild/modules/gnome.py')
-rw-r--r-- | mesonbuild/modules/gnome.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py index 038d179..62e3277 100644 --- a/mesonbuild/modules/gnome.py +++ b/mesonbuild/modules/gnome.py @@ -801,7 +801,9 @@ class GnomeModule(ExtensionModule): 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: - install = kwargs['install'] + install = kwargs['install_gir'] + if install is None: + install = kwargs['install'] install_dir = kwargs['install_dir_gir'] if install_dir is None: @@ -825,7 +827,9 @@ class GnomeModule(ExtensionModule): def _make_typelib_target(self, state: 'ModuleState', typelib_output: str, typelib_cmd: T.List[str], generated_files: T.Sequence[T.Union[str, mesonlib.File, build.CustomTarget, build.CustomTargetIndex, build.GeneratedList]], kwargs: T.Dict[str, T.Any]) -> TypelibTarget: - install = kwargs['install'] + install = kwargs['install_typelib'] + if install is None: + install = kwargs['install'] install_dir = kwargs['install_dir_typelib'] if install_dir is None: @@ -916,9 +920,13 @@ class GnomeModule(ExtensionModule): KwargInfo('identifier_prefix', ContainerTypeInfo(list, str), default=[], listify=True), KwargInfo('include_directories', ContainerTypeInfo(list, (str, build.IncludeDirs)), default=[], listify=True), KwargInfo('includes', ContainerTypeInfo(list, (str, GirTarget)), default=[], listify=True), + KwargInfo('install_gir', (bool, NoneType), since='0.61.0'), KwargInfo('install_dir_gir', (str, bool, NoneType), + deprecated_values={False: ('0.61.0', 'Use install_gir to disable installation')}, validator=lambda x: 'as boolean can only be false' if x is True else None), + KwargInfo('install_typelib', (bool, NoneType), since='0.61.0'), KwargInfo('install_dir_typelib', (str, bool, NoneType), + deprecated_values={False: ('0.61.0', 'Use install_typelib to disable installation')}, validator=lambda x: 'as boolean can only be false' if x is True else None), KwargInfo('link_with', ContainerTypeInfo(list, (build.SharedLibrary, build.StaticLibrary)), default=[], listify=True), KwargInfo('namespace', str, required=True), |