summaryrefslogtreecommitdiff
path: root/0002-use-system-python.patch
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2024-04-15 01:44:51 +0000
committerCoprDistGit <infra@openeuler.org>2024-04-15 01:44:51 +0000
commit7993554df0b339b282e99a6b02596e63637c44df (patch)
tree614553ac99434b1ab3f161c57eb71aefeda9b4fa /0002-use-system-python.patch
parent69fb29f4d56164797f0f1ce9368f9466d9124c02 (diff)
automatic import of onnxruntime
Diffstat (limited to '0002-use-system-python.patch')
-rw-r--r--0002-use-system-python.patch20
1 files changed, 20 insertions, 0 deletions
diff --git a/0002-use-system-python.patch b/0002-use-system-python.patch
new file mode 100644
index 0000000..b810f0d
--- /dev/null
+++ b/0002-use-system-python.patch
@@ -0,0 +1,20 @@
+diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
+index 82a454791d..ddb7a904f2 100644
+--- a/cmake/CMakeLists.txt
++++ b/cmake/CMakeLists.txt
+@@ -531,12 +531,12 @@ endif()
+ if (onnxruntime_BUILD_SHARED_LIB OR onnxruntime_ENABLE_PYTHON)
+ if (onnxruntime_ENABLE_PYTHON)
+ if (onnxruntime_ENABLE_LANGUAGE_INTEROP_OPS OR onnxruntime_REQUIRE_PYTHON_EMBED_LIB)
+- find_package(Python 3.8 COMPONENTS Interpreter Development NumPy)
++ find_package(Python ${PYTHON_VERSION} COMPONENTS Interpreter Development NumPy)
+ else()
+- find_package(Python 3.8 COMPONENTS Interpreter Development.Module NumPy)
++ find_package(Python ${PYTHON_VERSION} COMPONENTS Interpreter Development.Module NumPy)
+ endif()
+ else()
+- find_package(Python 3.8 COMPONENTS Interpreter)
++ find_package(Python ${PYTHON_VERSION} COMPONENTS Interpreter)
+ endif()
+ endif()
+