Skip to content

Commit 8b6df55

Browse files
committed
fix: regresssion for '-' in version name (#834)
Fix #833. Signed-off-by: Henry Schreiner <[email protected]>
1 parent 6090155 commit 8b6df55

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/scikit_build_core/program_search.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,9 @@ def get_cmake_program(cmake_path: Path) -> Program:
8080
try:
8181
result = Run().capture(cmake_path, "-E", "capabilities")
8282
try:
83-
version = Version(json.loads(result.stdout)["version"]["string"])
83+
version = Version(
84+
json.loads(result.stdout)["version"]["string"].split("-")[0]
85+
)
8486
logger.info("CMake version: {}", version)
8587
return Program(cmake_path, version)
8688
except (json.decoder.JSONDecodeError, KeyError, InvalidVersion):

0 commit comments

Comments
 (0)