Skip to content

Commit

Permalink
BUG: handle install plan with null tag
Browse files Browse the repository at this point in the history
Handle tags in the same way as meson install: strip white space from
tags passed via the --tags meson install command line option, do not
strip tags specified in meson.build and obtained from install_plan
entries.

Fixes #421.
  • Loading branch information
bruchar1 authored and dnicolodi committed Jun 20, 2023
1 parent fb26702 commit d5cb621
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions mesonpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -853,11 +853,10 @@ def _install_plan(self) -> Dict[str, Dict[str, Dict[str, str]]]:

# filter the install_plan for files that do not fit the install tags
if args.tags:
install_tags = args.tags.split(',')

install_tags = {tag.strip() for tag in args.tags.split(',')}
for files in install_plan.values():
for file, details in list(files.items()):
if details['tag'].strip() not in install_tags:
if details['tag'] not in install_tags:
del files[file]

return install_plan
Expand Down

0 comments on commit d5cb621

Please sign in to comment.