Skip to content

Commit

Permalink
BUG: allow install_subdir() of missing directories (#676)
Browse files Browse the repository at this point in the history
Remove the assert that made sure the source path for install_subdir()
is an existing directory. Meson warns in this case but allows it.
Empty directories for missing source directories are not created in
the Python wheel as these are hardly meaningful.
  • Loading branch information
dnicolodi authored Oct 15, 2024
1 parent 7edbce0 commit 391d021
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion mesonpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ def _map_to_wheel(sources: Dict[str, Dict[str, Any]]) -> DefaultDict[str, List[T
f'It is recommended to set it in "import(\'python\').find_installation()"')

if key == 'install_subdirs' or key == 'targets' and os.path.isdir(src):
assert os.path.isdir(src)
exclude_files = {os.path.normpath(x) for x in target.get('exclude_files', [])}
exclude_dirs = {os.path.normpath(x) for x in target.get('exclude_dirs', [])}
for root, dirnames, filenames in os.walk(src):
Expand Down

0 comments on commit 391d021

Please sign in to comment.