Skip to content

Commit 056e7ca

Browse files
committed
fix: make sure paths are Paths
Signed-off-by: Henry Schreiner <[email protected]>
1 parent 407b0b1 commit 056e7ca

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/scikit_build_core/builder/builder.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -232,15 +232,15 @@ def configure(
232232
numpy_include_dir = get_numpy_include_dir()
233233

234234
# Classic Find Python
235-
cache_config["PYTHON_EXECUTABLE"] = sys.executable
235+
cache_config["PYTHON_EXECUTABLE"] = Path(sys.executable)
236236
cache_config["PYTHON_INCLUDE_DIR"] = python_include_dir
237237
if python_library:
238238
cache_config["PYTHON_LIBRARY"] = python_library
239239

240240
# Modern Find Python
241241
for prefix in ("Python", "Python3"):
242-
cache_config[f"{prefix}_EXECUTABLE"] = sys.executable
243-
cache_config[f"{prefix}_ROOT_DIR"] = sys.prefix
242+
cache_config[f"{prefix}_EXECUTABLE"] = Path(sys.executable)
243+
cache_config[f"{prefix}_ROOT_DIR"] = Path(sys.prefix)
244244
cache_config[f"{prefix}_INCLUDE_DIR"] = python_include_dir
245245
cache_config[f"{prefix}_FIND_REGISTRY"] = "NEVER"
246246
# FindPython may break if this is set - only useful on Windows

0 commit comments

Comments
 (0)