File: system-python.patch

package info (click to toggle)
onnxruntime 1.23.2%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 340,744 kB
  • sloc: cpp: 3,222,135; python: 188,267; ansic: 114,318; asm: 37,927; cs: 36,849; java: 10,962; javascript: 6,811; pascal: 4,126; sh: 2,996; xml: 705; objc: 281; makefile: 67
file content (26 lines) | stat: -rw-r--r-- 1,131 bytes parent folder | download
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
@@ -493,16 +493,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()