@@ -34,27 +34,27 @@ include(CheckPythonPackage)
3434# Check python packages from requirements.txt
3535file (STRINGS ${CMAKE_CURRENT_LIST_DIR} /requirements.txt PYTHON_REQUIREMENTS)
3636foreach (REQUIREMENT ${PYTHON_REQUIREMENTS} )
37- # Look for a string from the start of each line that does not contain "<", ">", "=", or " ".
38- if (REQUIREMENT MATCHES "^([^<>= ]+)" )
39- set (PACKAGE_NAME ${CMAKE_MATCH_1} )
40- string (TOUPPER ${PACKAGE_NAME} PACKAGE_NAME_UCASE) # Ucase name needed for CMake variable
41- string (TOLOWER ${PACKAGE_NAME} PACKAGE_NAME_LCASE) # Lcase name needed for import statement
42-
43- check_python_package(${PACKAGE_NAME_LCASE} HAVE_PYTHON_${PACKAGE_NAME_UCASE} )
44- if (NOT HAVE_PYTHON_${PACKAGE_NAME_UCASE} )
45- message (WARNING "Missing Python dependency ${PACKAGE_NAME} " )
46- endif ()
47- else ()
48- message (FATAL_ERROR "Cannot parse line \" ${REQUIREMENT} \" in requirements.txt" )
49- endif ()
37+ # Look for a string from the start of each line that does not contain "<", ">", "=", or " ".
38+ if (REQUIREMENT MATCHES "^([^<>= ]+)" )
39+ set (PACKAGE_NAME ${CMAKE_MATCH_1} )
40+ string (TOUPPER ${PACKAGE_NAME} PACKAGE_NAME_UCASE) # Ucase name needed for CMake variable
41+ string (TOLOWER ${PACKAGE_NAME} PACKAGE_NAME_LCASE) # Lcase name needed for import statement
42+
43+ check_python_package(${PACKAGE_NAME_LCASE} HAVE_PYTHON_${PACKAGE_NAME_UCASE} )
44+ if (NOT HAVE_PYTHON_${PACKAGE_NAME_UCASE} )
45+ message (WARNING "Missing Python dependency ${PACKAGE_NAME} " )
46+ endif ()
47+ else ()
48+ message (FATAL_ERROR "Cannot parse line \" ${REQUIREMENT} \" in requirements.txt" )
49+ endif ()
5050
5151endforeach ()
5252
5353# Check deps for memap
5454if (Python3_FOUND AND HAVE_PYTHON_INTELHEX AND HAVE_PYTHON_PRETTYTABLE)
55- set (HAVE_MEMAP_DEPS TRUE )
55+ set (HAVE_MEMAP_DEPS TRUE )
5656else ()
57- set (HAVE_MEMAP_DEPS FALSE )
58- message (STATUS "Missing Python dependencies (python3, intelhex, prettytable) so the memory map cannot be printed" )
57+ set (HAVE_MEMAP_DEPS FALSE )
58+ message (STATUS "Missing Python dependencies (python3, intelhex, prettytable) so the memory map cannot be printed" )
5959endif ()
6060
0 commit comments