Skip to content

Commit adf24d9

Browse files
committed
ENH: raise an error when a Meson installation path looks wrong
1 parent 55ab6fd commit adf24d9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

mesonpy/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,8 @@ def _map_to_wheel(sources: Dict[str, Dict[str, Any]]) -> DefaultDict[str, List[T
160160
wheel_files[directory].append((path, src))
161161
else:
162162
warnings.warn(f'Installation path {dest!r} for {src!r} could not be mapped to an equivalent wheel directory.')
163+
if not re.match(r'^{\w+}$', path.parts[0]):
164+
raise RuntimeError('Meson installation path {dest!r} does not start with a placeholder. Meson bug!')
163165
return wheel_files
164166

165167

0 commit comments

Comments
 (0)