Skip to content

Commit 0e7ad91

Browse files
committed
MAINT: do not return the ninja binary path as a pathlib.Path object
It is converted right back to a string in all cases.
1 parent 14debba commit 0e7ad91

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mesonpy/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1141,7 +1141,7 @@ def _validate_string_collection(key: str) -> None:
11411141
yield project
11421142

11431143

1144-
def _env_ninja_command(*, version: str = _NINJA_REQUIRED_VERSION) -> Optional[pathlib.Path]:
1144+
def _env_ninja_command(*, version: str = _NINJA_REQUIRED_VERSION) -> Optional[str]:
11451145
"""
11461146
Returns the path to ninja, or None if no ninja found.
11471147
"""
@@ -1161,7 +1161,7 @@ def _env_ninja_command(*, version: str = _NINJA_REQUIRED_VERSION) -> Optional[pa
11611161
continue
11621162
if candidate_version < required_version:
11631163
continue
1164-
return pathlib.Path(ninja_path)
1164+
return ninja_path
11651165

11661166
return None
11671167

0 commit comments

Comments
 (0)