Skip to content
Snippets Groups Projects
Commit 2d3ef5a7 authored by Timo Koch's avatar Timo Koch Committed by Robert K
Browse files

[cmake][python] Do not create install rule for Python packages when DUNE_PYTHON_USE_VENV=FALSE

parent 42f1fd9f
Branches
Tags
1 merge request!1222[feature][Python] Make use of venv optional. Default is ON.
......@@ -471,6 +471,7 @@ function(dune_python_configure_package)
# installation command for dune package into local env - external requirements are already sorted and we want this step to not require
# internet access. Dune packages need to be installed at this stage and should not be obtained from pypi (those packages include the C++ part
# of the module which we don't want to install. So only use available wheels.
# Only install dependencies if the use of virtual environments is enabled.
if(NOT SKBUILD AND DUNE_PYTHON_USE_VENV)
message(STATUS "Installing python package at ${PYPKGCONF_PATH} into Dune virtual environment ${DUNE_PIP_INDEX}")
dune_execute_process(
......@@ -536,6 +537,12 @@ function(dune_python_configure_package)
endif()
endif()
# Only add installation rules to make install if virtual environments are enabled
# Otherwise installation of Python packages is in user-hands
if(NOT DUNE_PYTHON_USE_VENV)
return()
endif()
# Construct the wheel installation commandline
# TODO should the wheel be build for the internal env setup or for the external one?
set(WHEEL_COMMAND ${DUNE_PYTHON_VIRTUALENV_EXECUTABLE} -m pip wheel -w ${DUNE_PYTHON_WHEELHOUSE} --no-deps
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment