Skip to content
Snippets Groups Projects
Commit cde3ff09 authored by Steffen Müthing's avatar Steffen Müthing
Browse files

[!560] Prioritize the virtualenv over venv in presence of both packages

Merge branch 'feature/prioritize-virtualenv-package-over-venv' into 'master'

ref:core/dune-common The venv packages cannot handle the system interpreter
being a virtualenv in itself - though this is not incommon. The commit just
prioritizes virtualenv and spits out warning if a user runs into the above
scenario.

This merge request supersedes [!559] after @smuething dislike for the former.

See merge request [core/dune-common!560]

  [!559]: gitlab.dune-project.org/NoneNone/merge_requests/559
  [core/dune-common!560]: gitlab.dune-project.org/core/dune-common/merge_requests/560
parents 6d6024fc 48232c03
Branches
Tags
1 merge request!560Prioritize the virtualenv over venv in presence of both packages
Pipeline #14003 passed
......@@ -120,13 +120,18 @@ if(NOT IS_DIRECTORY "${DUNE_PYTHON_VIRTUALENV_PATH}")
endif()
# Set some options depending on which virtualenv package is used
if(DUNE_PYTHON_venv_FOUND)
set(VIRTUALENV_PACKAGE_NAME venv)
set(NOPIP_OPTION --without-pip)
endif()
if(DUNE_PYTHON_virtualenv_FOUND)
set(VIRTUALENV_PACKAGE_NAME virtualenv)
set(NOPIP_OPTION --no-pip)
endif()
if(DUNE_PYTHON_venv_FOUND)
set(VIRTUALENV_PACKAGE_NAME venv)
set(NOPIP_OPTION --without-pip)
if(("${VIRTUALENV_PACKAGE_NAME}" STREQUAL "venv") AND DUNE_PYTHON_SYSTEM_IS_VIRTUALENV)
message("-- WARNING: You are using a system interpreter which is a virtualenv and the venv package.")
message(" You might want to consider installing the virtualenv package if you experience inconveniences.")
endif()
# Set up the env itself
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment