@@ -34,27 +34,27 @@ include(CheckPythonPackage)
34
34
# Check python packages from requirements.txt
35
35
file (STRINGS ${CMAKE_CURRENT_LIST_DIR} /requirements.txt PYTHON_REQUIREMENTS )
36
36
foreach (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 ()
50
50
51
51
endforeach ()
52
52
53
53
# Check deps for memap
54
54
if (Python3_FOUND AND HAVE_PYTHON_INTELHEX AND HAVE_PYTHON_PRETTYTABLE )
55
- set (HAVE_MEMAP_DEPS TRUE )
55
+ set (HAVE_MEMAP_DEPS TRUE )
56
56
else ()
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" )
59
59
endif ()
60
60
0 commit comments