File: system-python.patch

package info (click to toggle)
onnxruntime 1.21.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 333,864 kB
  • sloc: cpp: 3,153,080; python: 179,219; ansic: 109,131; asm: 37,791; cs: 34,424; perl: 13,070; java: 11,047; javascript: 6,330; pascal: 4,126; sh: 3,277; xml: 598; objc: 281; makefile: 63
file content (26 lines) | stat: -rw-r--r-- 1,131 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Description: Use system Python
Forwarded: not-needed
Origin: https://src.fedoraproject.org/rpms/onnxruntime/blob/f40/f/system-python.patch

--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -671,16 +671,16 @@
 if (onnxruntime_BUILD_SHARED_LIB OR onnxruntime_ENABLE_PYTHON)
   if (onnxruntime_ENABLE_PYTHON)
     if (onnxruntime_REQUIRE_PYTHON_EMBED_LIB)
-      find_package(Python 3.10 COMPONENTS Interpreter Development NumPy)
+      find_package(Python ${PYTHON_VERSION} COMPONENTS Interpreter Development NumPy)
     else()
-      find_package(Python 3.10 COMPONENTS Interpreter Development.Module NumPy)
+      find_package(Python ${PYTHON_VERSION} COMPONENTS Interpreter Development.Module NumPy)
     endif()
     message("Numpy version: ${Python_NumPy_VERSION}")
     if(Python_NumPy_VERSION VERSION_LESS "2.0.0")
       message(WARNING "The build binary will not be compatible with NumPy 2.0 because the NumPy installed on this machine is too low.")
     endif()
   else()
-    find_package(Python 3.10 COMPONENTS Interpreter)
+    find_package(Python ${PYTHON_VERSION} COMPONENTS Interpreter)
   endif()
 endif()