From 10b88a21461c8dbae75f65e2740d71b13f685031 Mon Sep 17 00:00:00 2001 From: Vanya Belyaev Date: Fri, 6 Sep 2024 16:29:26 +0200 Subject: [PATCH] fix ? --- ostap/CMakeLists.txt | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/ostap/CMakeLists.txt b/ostap/CMakeLists.txt index 53fd844c..7a639765 100644 --- a/ostap/CMakeLists.txt +++ b/ostap/CMakeLists.txt @@ -255,16 +255,17 @@ endif() # ======================================================================================== ## hep_ml # ======================================================================================== -## -find_python_module ( hep_ml QUIET ) -if ( NOT ${PY_hep_ml_FOUND} ) - execute_process(COMMAND ${PYTHON_EXECUTABLE} -m pip install hep_ml ${PIP_ARGS}) -endif() -find_python_module ( hep_ml QUIET ) -if ( NOT ${PY_hep_ml_FOUND} ) - message ( "----> warning (optional) hep_ml is NOT found!" ) +if ( ${PYTHON_VERSION} VERSION_LESS "3.12" ) + find_python_module ( hep_ml QUIET ) + if ( NOT ${PY_hep_ml_FOUND} ) + execute_process(COMMAND ${PYTHON_EXECUTABLE} -m pip install hep_ml ${PIP_ARGS}) + endif() + find_python_module ( hep_ml QUIET ) + if ( NOT ${PY_hep_ml_FOUND} ) + message ( "----> warning (optional) hep_ml is NOT found!" ) + endif() endif() - + # ========================================================================================= ## INSTALLATION # =========================================================================================