From 0eabd9665590787642afc525059cdbf71f1f7e9a Mon Sep 17 00:00:00 2001 From: Pieter Pas Date: Wed, 11 Dec 2024 00:40:43 +0100 Subject: [PATCH] Add Python_ROOT CMake FindPython hint --- src/py_build_cmake/commands/cmake.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/py_build_cmake/commands/cmake.py b/src/py_build_cmake/commands/cmake.py index 52a70da..87da84d 100644 --- a/src/py_build_cmake/commands/cmake.py +++ b/src/py_build_cmake/commands/cmake.py @@ -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