Improve virtualenv placement
The current logic for placing / locating the virtualenv is rather flaky in combination with
installed modules or when DUNE_PYTHON_VIRTUALENV_SETUP
was not enabled for all modules (as happens
in the CI images).
This MR improves the situation in two ways:
-
It allows users to explicitly set
DUNE_PYTHON_VIRTUALENV_PATH
when running CMake. The build system will then use the given path for the virtualenv instead of guessing a location. -
When using an absolute build directory with dunecontrol, the virtualenv will no longer be placed inside the build directory of any module, but in the dedicated top-level directory
dune-python-env
inside the build directory root. This behavior can be disabled by settingDUNE_PYTHON_EXTERNAL_VIRTUALENV_FOR_ABSOLUTE_BUILDDIR=0
.