Skip to content

Commit a44fbc6

Browse files
authored
fix: only set the lib for FindPython on Windows (#285)
Fixes #283. Ideally this needs to be fixed upstream. Signed-off-by: Henry Schreiner <[email protected]>
1 parent 7bac01c commit a44fbc6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/scikit_build_core/builder/builder.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,8 @@ def configure(
144144
cache_config[f"{prefix}_ROOT_DIR"] = sys.prefix
145145
cache_config[f"{prefix}_INCLUDE_DIR"] = python_include_dir
146146
cache_config[f"{prefix}_FIND_REGISTRY"] = "NEVER"
147-
if python_library:
147+
# FindPython may break if this is set - only useful on Windows
148+
if python_library and sys.platform.startswith("win"):
148149
cache_config[f"{prefix}_LIBRARY"] = python_library
149150

150151
if limited_abi:

0 commit comments

Comments
 (0)