Skip to content

Commit

Permalink
Add Python_ROOT CMake FindPython hint
Browse files Browse the repository at this point in the history
  • Loading branch information
tttapa committed Dec 10, 2024
1 parent dcc58db commit 0eabd96
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/py_build_cmake/commands/cmake.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ def get_native_python_hints(self, prefix: str) -> Generator[Option]:
# one version of Python, CMake should locate it correctly. Note that
# we also set Python_FIND_STRATEGY=LOCATION to make sure that CMake
# does not select a newer version of Python it found elsewhere.
yield Option(prefix + "_ROOT", self.get_native_python_prefixes())
yield Option(prefix + "_ROOT_DIR", self.get_native_python_prefixes())
# If there are multiple versions of Python installed in the same
# ROOT_DIR, then CMake could pick up the wrong version (it picks the
Expand Down

0 comments on commit 0eabd96

Please sign in to comment.