Skip to content

Commit 391d021

Browse files
authored
BUG: allow install_subdir() of missing directories (#676)
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.
1 parent 7edbce0 commit 391d021

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

mesonpy/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ def _map_to_wheel(sources: Dict[str, Dict[str, Any]]) -> DefaultDict[str, List[T
119119
f'It is recommended to set it in "import(\'python\').find_installation()"')
120120

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

0 commit comments

Comments
 (0)