summaryrefslogtreecommitdiffstats
path: root/contrib/tools/python3/Lib/venv/scripts/common
diff options
context:
space:
mode:
authorshadchin <[email protected]>2025-06-13 00:05:26 +0300
committershadchin <[email protected]>2025-06-13 00:35:30 +0300
commit796b9088366b10b4cd42885101fc20c0b5709b07 (patch)
treef287eacb0b95ffd7cabf95b16cafb4788645dc38 /contrib/tools/python3/Lib/venv/scripts/common
parentc72bca862651e507d2ff4980ef7f4ff7267a7227 (diff)
Update Python 3 to 3.12.10
commit_hash:dd2398e159fe1d72ea6b12da52fccc933a41a785
Diffstat (limited to 'contrib/tools/python3/Lib/venv/scripts/common')
-rw-r--r--contrib/tools/python3/Lib/venv/scripts/common/activate27
1 files changed, 16 insertions, 11 deletions
diff --git a/contrib/tools/python3/Lib/venv/scripts/common/activate b/contrib/tools/python3/Lib/venv/scripts/common/activate
index 74825877c38..70673a265d4 100644
--- a/contrib/tools/python3/Lib/venv/scripts/common/activate
+++ b/contrib/tools/python3/Lib/venv/scripts/common/activate
@@ -37,19 +37,26 @@ deactivate () {
deactivate nondestructive
# on Windows, a path can contain colons and backslashes and has to be converted:
-if [ "${OSTYPE:-}" = "cygwin" ] || [ "${OSTYPE:-}" = "msys" ] ; then
- # transform D:\path\to\venv to /d/path/to/venv on MSYS
- # and to /cygdrive/d/path/to/venv on Cygwin
- export VIRTUAL_ENV=$(cygpath __VENV_DIR__)
-else
- # use the path as-is
- export VIRTUAL_ENV=__VENV_DIR__
-fi
+case "$(uname)" in
+ CYGWIN*|MSYS*|MINGW*)
+ # transform D:\path\to\venv to /d/path/to/venv on MSYS and MINGW
+ # and to /cygdrive/d/path/to/venv on Cygwin
+ VIRTUAL_ENV=$(cygpath __VENV_DIR__)
+ export VIRTUAL_ENV
+ ;;
+ *)
+ # use the path as-is
+ export VIRTUAL_ENV=__VENV_DIR__
+ ;;
+esac
_OLD_VIRTUAL_PATH="$PATH"
PATH="$VIRTUAL_ENV/"__VENV_BIN_NAME__":$PATH"
export PATH
+VIRTUAL_ENV_PROMPT=__VENV_PROMPT__
+export VIRTUAL_ENV_PROMPT
+
# unset PYTHONHOME if set
# this will fail if PYTHONHOME is set to the empty string (which is bad anyway)
# could use `if (set -u; : $PYTHONHOME) ;` in bash
@@ -60,10 +67,8 @@ fi
if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT:-}" ] ; then
_OLD_VIRTUAL_PS1="${PS1:-}"
- PS1=__VENV_PROMPT__"${PS1:-}"
+ PS1="("__VENV_PROMPT__") ${PS1:-}"
export PS1
- VIRTUAL_ENV_PROMPT=__VENV_PROMPT__
- export VIRTUAL_ENV_PROMPT
fi
# Call hash to forget past commands. Without forgetting