Skip to content

Commit

Permalink
Reference CMake discourse thread about Python_ROOT
Browse files Browse the repository at this point in the history
  • Loading branch information
tttapa committed Dec 25, 2024
1 parent 0eabd96 commit 690efa7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/py_build_cmake/commands/cmake.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,8 @@ def get_native_python_hints(self, prefix: str) -> Generator[Option]:
# look in the given directories first. If the ROOT_DIR contains just
# 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.
# does not select a newer version of Python it found elsewhere. See also
# https://discourse.cmake.org/t/how-to-force-findpython-to-locate-a-specific-version-of-python-without-specifying-every-last-artifact/13165/5
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
Expand Down

0 comments on commit 690efa7

Please sign in to comment.