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