.. _DUNE_PYTHON_EXTERNAL_VIRTUALENV_FOR_ABSOLUTE_BUILDDIR:

DUNE_PYTHON_EXTERNAL_VIRTUALENV_FOR_ABSOLUTE_BUILDDIR
=====================================================

.. cmake_variable:: DUNE_PYTHON_EXTERNAL_VIRTUALENV_FOR_ABSOLUTE_BUILDDIR

   Before Dune 2.7, the virtualenv was always placed inside the build directory of  the first
   non-installed Dune module that the current module depends on. When using installed core modules
   or a multi-stage installation process, this can lead to situations where there are multiple
   virtualenvs, making it impossible to find all Python modules installed by upstream modules.
   In order to avoid this problem at least for builds using an absolute build directory (i.e., the
   :code:`--builddir` option of dunecontrol refers to an absolute path), the build system will
   place the virtualenv in a dedicated directory :code:`dune-python-env` inside that absolute
   build directory, where it will be found by all Dune modules. If you want to disable this
   behavior, set :code:`DUNE_PYTHON_EXTERNAL_VIRTUALENV_FOR_ABSOLUTE_BUILDDIR=0`.

