set(proj python-wheel) # Set dependency list set(${proj}_DEPENDENCIES python python-pip python-setuptools ) if(NOT DEFINED Slicer_USE_SYSTEM_${proj}) set(Slicer_USE_SYSTEM_${proj} ${Slicer_USE_SYSTEM_python}) endif() # Include dependent projects if any ExternalProject_Include_Dependencies(${proj} PROJECT_VAR proj DEPENDS_VAR ${proj}_DEPENDENCIES) if(Slicer_USE_SYSTEM_${proj}) foreach(module_name IN ITEMS wheel) ExternalProject_FindPythonPackage( MODULE_NAME "${module_name}" REQUIRED ) endforeach() endif() if(NOT Slicer_USE_SYSTEM_${proj}) set(requirements_file ${CMAKE_BINARY_DIR}/${proj}-requirements.txt) file(WRITE ${requirements_file} [===[ wheel==0.33.6 --hash=sha256:f4da1763d3becf2e2cd92a14a7c920f0f00eca30fdde9ea992c836685b9faf28 ]===]) ExternalProject_Add(${proj} ${${proj}_EP_ARGS} DOWNLOAD_COMMAND "" SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj} BUILD_IN_SOURCE 1 CONFIGURE_COMMAND "" BUILD_COMMAND "" INSTALL_COMMAND ${PYTHON_EXECUTABLE} -m pip install --require-hashes -r ${requirements_file} LOG_INSTALL 1 DEPENDS ${${proj}_DEPENDENCIES} ) ExternalProject_GenerateProjectDescription_Step(${proj} VERSION ${_version} ) else() ExternalProject_Add_Empty(${proj} DEPENDS ${${proj}_DEPENDENCIES}) endif()