From 91809a5c48a97d76b46193445ae838cff42be0f4 Mon Sep 17 00:00:00 2001 From: Pavel Sobolev Date: Fri, 22 May 2026 21:55:05 +0300 Subject: [PATCH] sci-libs/onnxruntime: use the same Python version as ONNX for tests This is relevant only when the `python` USE flag is not enabled. Signed-off-by: Pavel Sobolev --- sci-libs/onnxruntime/onnxruntime-1.26.0-r1.ebuild | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sci-libs/onnxruntime/onnxruntime-1.26.0-r1.ebuild b/sci-libs/onnxruntime/onnxruntime-1.26.0-r1.ebuild index 61d007fa54..f668aaf8fe 100644 --- a/sci-libs/onnxruntime/onnxruntime-1.26.0-r1.ebuild +++ b/sci-libs/onnxruntime/onnxruntime-1.26.0-r1.ebuild @@ -64,6 +64,7 @@ BDEPEND=" test? ( dev-cpp/gtest + $(python_gen_any_dep 'sci-ml/onnx[${PYTHON_USEDEP}]') python? ( dev-python/pytest[${PYTHON_USEDEP}] ) ) @@ -78,6 +79,12 @@ PATCHES=( CMAKE_USE_DIR="${S}/cmake" +# The `$(python_get_sitedir)/onnx/onnx-ml.proto` file is used during tests +python_check_deps() { + ! use test && return 0 + python_has_version "sci-ml/onnx[${PYTHON_USEDEP}]" +} + src_configure() { # Python is used at build time unconditionally python_setup