FindPython: Extend virtual environment handling by considering conda

- Add functionality to recognize and use CONDA_PREFIX environment variable
- Add tests for conda virtual environments
- Fixes: #20111
This commit is contained in:
Sebastian Müller
2019-12-20 13:24:54 +01:00
parent 9f75f9974f
commit 776d27d4a4
12 changed files with 123 additions and 26 deletions

View File

@@ -176,12 +176,12 @@ Hints
variable will be used, if any.
``Python2_FIND_VIRTUALENV``
This variable defines the handling of virtual environments. It is meaningfull
only when a virtual environment is active (i.e. the ``activate`` script has
been evaluated). In this case, it takes precedence over
``Python2_FIND_REGISTRY`` and ``CMAKE_FIND_FRAMEWORK`` variables.
The ``Python2_FIND_VIRTUALENV`` variable can be set to empty or one of the
following:
This variable defines the handling of virtual environments managed by
``virtualenv`` or ``conda``. It is meaningful only when a virtual environment
is active (i.e. the ``activate`` script has been evaluated). In this case, it
takes precedence over ``Python2_FIND_REGISTRY`` and ``CMAKE_FIND_FRAMEWORK``
variables. The ``Python2_FIND_VIRTUALENV`` variable can be set to empty or
one of the following:
* ``FIRST``: The virtual environment is used before any other standard
paths to look-up for the interpreter. This is the default.