.. _dune_python_force_version:

dune_python_force_version
=========================

.. cmake_function:: dune_python_force_version

   .. cmake_param:: version
      :positional:
      :single:
      :required:

      The major python version: 2 or 3

   Enforce the major version of the python interpreter to be either 2 or 3.

   .. note::

      This is the developer-facing interface to enforce a major python version.
      A user can set the input variable :ref:`DUNE_PYTHON_FORCE_PYTHON2` or
      :ref:`DUNE_PYTHON_FORCE_PYTHON3` to achieve the same result for a given build only.

