Skip to content

fix: make sure all paths are CMake paths #1063

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/scikit_build_core/builder/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,15 +232,15 @@ def configure(
numpy_include_dir = get_numpy_include_dir()

# Classic Find Python
cache_config["PYTHON_EXECUTABLE"] = sys.executable
cache_config["PYTHON_EXECUTABLE"] = Path(sys.executable)
cache_config["PYTHON_INCLUDE_DIR"] = python_include_dir
if python_library:
cache_config["PYTHON_LIBRARY"] = python_library

# Modern Find Python
for prefix in ("Python", "Python3"):
cache_config[f"{prefix}_EXECUTABLE"] = sys.executable
cache_config[f"{prefix}_ROOT_DIR"] = sys.prefix
cache_config[f"{prefix}_EXECUTABLE"] = Path(sys.executable)
cache_config[f"{prefix}_ROOT_DIR"] = Path(sys.prefix)
cache_config[f"{prefix}_INCLUDE_DIR"] = python_include_dir
cache_config[f"{prefix}_FIND_REGISTRY"] = "NEVER"
# FindPython may break if this is set - only useful on Windows
Expand Down
2 changes: 2 additions & 0 deletions tests/packages/dynamic_metadata/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ set(Python_SOABI ${SKBUILD_SOABI})
python_add_library(_module MODULE src/module.c WITH_SOABI)

install(TARGETS _module DESTINATION ${SKBUILD_PROJECT_NAME})
install(
CODE "execute_process(COMMAND ${Python_EXECUTABLE} -V COMMAND_ECHO STDOUT)")
Loading