File onnxruntime-onnx-exact-python-version.patch of Package onnxruntime

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 584c0419a..19cbf9554 100644
--- a/cmake/external/onnx/CMakeLists.txt
+++ b/cmake/external/onnx/CMakeLists.txt
@@ -143,10 +143,10 @@ if(CMAKE_CROSSCOMPILING)
   find_package(Python REQUIRED COMPONENTS Interpreter)
   set(ONNX_PYTHON_INTERPRETER Python::Interpreter)
 else()
-  find_package(Python3 REQUIRED COMPONENTS Interpreter ${python_dev_component})
+  find_package(Python3 ${PYTHON_VERSION} REQUIRED COMPONENTS Interpreter ${python_dev_component})
   # Find Python for nanobind
   set(Python_EXECUTABLE ${Python3_EXECUTABLE})
-  find_package(Python REQUIRED COMPONENTS Interpreter ${python_dev_component})
+  find_package(Python ${PYTHON_VERSION} REQUIRED COMPONENTS Interpreter ${python_dev_component})
   set(ONNX_PYTHON_INTERPRETER Python3::Interpreter)
 endif()
 
openSUSE Build Service is sponsored by