Skip to content
Snippets Groups Projects
Commit 48232c03 authored by Dominic Kempf's avatar Dominic Kempf
Browse files

Prioritize the virtualenv over venv in presence of both packages

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.
parent 43772da6
Branches
Tags
1 merge request!560Prioritize the virtualenv over venv in presence of both packages
Pipeline #10957 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