mirror of https://github.com/ARMmbed/mbed-os.git
Whitespace formatting changes.
parent
0a67fef995
commit
9e2b04e945
|
|
@ -6,7 +6,6 @@
|
|||
|
||||
# set OUTPUT_VAR to whether PACKAGENAME was found
|
||||
function(check_python_package PACKAGENAME OUTPUT_VAR)
|
||||
|
||||
# can't have Python packages without Python!
|
||||
if(NOT Python3_FOUND)
|
||||
set(${OUTPUT_VAR} FALSE PARENT_SCOPE)
|
||||
|
|
@ -17,12 +16,10 @@ function(check_python_package PACKAGENAME OUTPUT_VAR)
|
|||
|
||||
if(DEFINED ${OUTPUT_VAR})
|
||||
if(${OUTPUT_VAR})
|
||||
|
||||
# if the python interpreter changed, we need to recheck
|
||||
if("${PY_INTERP_FOR_${OUTPUT_VAR}}" STREQUAL "${Python3_EXECUTABLE}")
|
||||
set(NEED_TO_RUN_CHECK FALSE)
|
||||
endif()
|
||||
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
|
@ -47,7 +44,6 @@ function(check_python_package PACKAGENAME OUTPUT_VAR)
|
|||
|
||||
set(${OUTPUT_VAR} ${HAVE_PACKAGE} CACHE BOOL "Whether the Python package ${PACKAGENAME} was found" FORCE)
|
||||
mark_as_advanced(${OUTPUT_VAR})
|
||||
|
||||
endif()
|
||||
endfunction(check_python_package)
|
||||
|
||||
|
|
|
|||
|
|
@ -33,10 +33,8 @@ include(${CMAKE_CURRENT_LIST_DIR}/CheckPythonPackage.cmake)
|
|||
# Check python packages from requirements.txt
|
||||
file(STRINGS ${CMAKE_CURRENT_LIST_DIR}/requirements.txt PYTHON_REQUIREMENTS)
|
||||
foreach(REQUIREMENT ${PYTHON_REQUIREMENTS})
|
||||
|
||||
# Look for a string from the start of each line that does not contain "<", ">", "=", or " ".
|
||||
if(REQUIREMENT MATCHES "^([^<>= ]+)")
|
||||
|
||||
set(PACKAGE_NAME ${CMAKE_MATCH_1})
|
||||
string(TOUPPER ${PACKAGE_NAME} PACKAGE_NAME_UCASE) # Ucase name needed for CMake variable
|
||||
string(TOLOWER ${PACKAGE_NAME} PACKAGE_NAME_LCASE) # Lcase name needed for import statement
|
||||
|
|
@ -45,11 +43,8 @@ foreach(REQUIREMENT ${PYTHON_REQUIREMENTS})
|
|||
if(NOT HAVE_PYTHON_${PACKAGE_NAME_UCASE})
|
||||
message(WARNING "Missing Python dependency ${PACKAGE_NAME}")
|
||||
endif()
|
||||
|
||||
else()
|
||||
|
||||
message(FATAL_ERROR "Cannot parse line \"${REQUIREMENT}\" in requirements.txt")
|
||||
|
||||
endif()
|
||||
|
||||
endforeach()
|
||||
|
|
@ -59,7 +54,6 @@ if(Python3_FOUND AND HAVE_PYTHON_INTELHEX AND HAVE_PYTHON_PRETTYTABLE)
|
|||
set(HAVE_MEMAP_DEPS TRUE)
|
||||
else()
|
||||
set(HAVE_MEMAP_DEPS FALSE)
|
||||
|
||||
message(STATUS "Missing Python dependencies (python3, intelhex, prettytable) so the memory map cannot be printed")
|
||||
endif()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue