diff options
| author | Dylan Baker <dylan@pnwbakers.com> | 2025-01-10 14:27:39 -0800 |
|---|---|---|
| committer | Dylan Baker <dylan@pnwbakers.com> | 2025-10-15 10:21:46 -0700 |
| commit | 020e58b59972a6cbfb78841021a87cd5162a9a77 (patch) | |
| tree | 12e218c1f4bbb17726156a2438a0f5e68354be32 | |
| parent | 72509ed0aa5e493567164a7feb2d72c11f05a606 (diff) | |
| download | meson-020e58b59972a6cbfb78841021a87cd5162a9a77.tar.gz | |
interpreter: convert BuildTarget install to bool in KwargInfo
This just does what would happen later, but with the potential to fail
in obscure way.
| -rw-r--r-- | mesonbuild/interpreter/type_checking.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/mesonbuild/interpreter/type_checking.py b/mesonbuild/interpreter/type_checking.py index 952049c9b..27beba6ae 100644 --- a/mesonbuild/interpreter/type_checking.py +++ b/mesonbuild/interpreter/type_checking.py @@ -579,16 +579,20 @@ def _target_install_feature_validator(val: object) -> T.Iterable[FeatureCheckBas 'This was never intended to work, and is essentially the same as using `install: true` regardless of value.') +def _target_install_convertor(val: object) -> bool: + return bool(val) + + # Applies to all build_target like classes _ALL_TARGET_KWS: T.List[KwargInfo] = [ OVERRIDE_OPTIONS_KW, KwargInfo('build_by_default', bool, default=True, since='0.38.0'), KwargInfo('extra_files', ContainerTypeInfo(list, (str, File)), default=[], listify=True), - # Accursed. We allow this for backwards compat and warn in the interpreter. KwargInfo( 'install', object, default=False, + convertor=_target_install_convertor, feature_validator=_target_install_feature_validator, ), INSTALL_MODE_KW, |
