Skip to content

Commit

Permalink
fix: regresssion for '-' in version name (#834)
Browse files Browse the repository at this point in the history
Fix #833.

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
  • Loading branch information
henryiii committed Jul 29, 2024
1 parent 9771da4 commit 8e892ce
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/scikit_build_core/program_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ def get_cmake_program(cmake_path: Path) -> Program:
try:
result = Run().capture(cmake_path, "-E", "capabilities")
try:
version = Version(json.loads(result.stdout)["version"]["string"])
version = Version(
json.loads(result.stdout)["version"]["string"].split("-")[0]
)
logger.info("CMake version: {}", version)
return Program(cmake_path, version)
except (json.decoder.JSONDecodeError, KeyError, InvalidVersion):
Expand Down

0 comments on commit 8e892ce

Please sign in to comment.