Skip to content
Snippets Groups Projects
Commit f40a7649 authored by Andreas Dedner's avatar Andreas Dedner
Browse files

improve DunePythonInstallPackage to handle missing pip

parent c30aa7a3
No related branches found
No related tags found
No related merge requests found
......@@ -40,11 +40,6 @@ function(dune_python_install_package)
message(WARNING "Unparsed arguments in dune_python_install_package: This often indicates typos!")
endif()
# Check for the presence of the pip package
if(NOT DUNE_PYTHON_pip_FOUND)
message(FATAL_ERROR "dune_python_install_package: Requested installations, but pip was not found!")
endif()
set(PYINST_FULLPATH ${CMAKE_CURRENT_SOURCE_DIR}/${PYINST_PATH})
if(EXISTS ${PYINST_FULLPATH}/setup.py.in)
configure_file(${PYINST_PATH}/setup.py.in ${PYINST_PATH}/setup.py)
......@@ -88,6 +83,16 @@ function(dune_python_install_package)
"${PYINST_FULLPATH}")
# Leave this function if no installation rules are required
if("${DUNE_PYTHON_INSTALL_LOCATION}" STREQUAL "none" AND NOT DUNE_PYTHON_VIRTUALENV_SETUP)
return()
endif()
# Check for the presence of the pip package
if(NOT DUNE_PYTHON_pip_FOUND)
message(FATAL_ERROR "dune_python_install_package: Requested installations, but pip was not found!")
endif()
#
# If requested, install into the configure-time Dune virtualenv
#
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment