Skip to content

Commit fde0731

Browse files
committed
ENH: warn on unhandled meson install arguments
1 parent 8d50078 commit fde0731

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

mesonpy/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -896,7 +896,10 @@ def _manifest(self) -> DefaultDict[str, List[Tuple[pathlib.Path, str]]]:
896896
parser = argparse.ArgumentParser(add_help=False)
897897
parser.add_argument('--tags')
898898
parser.add_argument('--skip-subprojects', nargs='?', const='*', default='')
899-
args, _ = parser.parse_known_args(self._meson_args['install'])
899+
args, others = parser.parse_known_args(self._meson_args['install'])
900+
if others:
901+
others = ' '.join(others)
902+
warnings.warn(f'unhandled arguments specified for meson install: {others}')
900903
install_tags = {t.strip() for t in args.tags.split(',')} if args.tags else None
901904
skip_subprojects = {p for p in (p.strip() for p in args.skip_subprojects.split(',')) if p}
902905

0 commit comments

Comments
 (0)