From c850d83bbd5ae6f0348894ba6ff80adec00b974f Mon Sep 17 00:00:00 2001 From: colramos-amd Date: Thu, 2 Nov 2023 16:14:16 -0500 Subject: [PATCH] Dynamically load dependency checker from requirements.txt Signed-off-by: colramos-amd --- CMakeLists.txt | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c801eb75e5..51e45f3515 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -72,20 +72,7 @@ if(DEFINED PYTHON_DEPS) endif() # Check required Python packages -set(pythonDeps - "astunparse" - "colorlover" - "dash" - "matplotlib" - "numpy" - "pandas" - "pymongo" - "yaml" - "tabulate" - "tqdm" - "dash_svg" - "dash_bootstrap_components" - "kaleido") +file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/requirements.txt" pythonDeps) message(STATUS "Checking for required Python package dependencies...") set_property(GLOBAL PROPERTY pythonDepsFlag "groovy") @@ -105,6 +92,7 @@ endfunction() list(APPEND CMAKE_MESSAGE_INDENT " ") foreach(package IN LISTS pythonDeps) + string(REGEX REPLACE "[><=].*" "" package "${package}") checkpythonpackage(${package}) endforeach() list(POP_BACK CMAKE_MESSAGE_INDENT)