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 <contact@paveloom.dev>
This commit is contained in:
Pavel Sobolev
2026-05-22 21:55:05 +03:00
parent 61d1b1da80
commit 91809a5c48

View File

@@ -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