File tree Expand file tree Collapse file tree 1 file changed +46
-4
lines changed Expand file tree Collapse file tree 1 file changed +46
-4
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
22
3- chmod 777 ./pyvenv.cfg
4- cat > ./pyvenv.cfg << EOF
5- home = ./bin
3+ DIR=" $( cd " $( dirname " $0 " ) " && pwd) "
4+ RUNTIME_DIR=" $DIR /../runtime"
5+ PYVENV_FILE=" $RUNTIME_DIR /pyvenv.cfg"
6+ ACTIVATE_FILE=" $RUNTIME_DIR /bin/activate"
7+
8+ mkdir -p " $RUNTIME_DIR /bin"
9+
10+ cat > " $PYVENV_FILE " << EOF
11+ home = $RUNTIME_DIR /bin
612include-system-site-packages = false
713version = 3.13.5
8- executable = ./bin/python3.13
14+ executable = $RUNTIME_DIR /bin/python3.13
15+ EOF
16+
17+ cat > " $ACTIVATE_FILE " << 'EOF '
18+ # This file must be sourced. You cannot run it directly.
19+
20+ deactivate () {
21+ if [ -n "$_OLD_VIRTUAL_PATH" ] ; then
22+ PATH="$_OLD_VIRTUAL_PATH"
23+ export PATH
24+ unset _OLD_VIRTUAL_PATH
25+ fi
26+
27+ if [ -n "$_OLD_VIRTUAL_PS1" ] ; then
28+ PS1="$_OLD_VIRTUAL_PS1"
29+ export PS1
30+ unset _OLD_VIRTUAL_PS1
31+ fi
32+
33+ unset VIRTUAL_ENV
34+ if [ ! "$1" = "nondestructive" ] ; then
35+ unset -f deactivate
36+ fi
37+ }
38+
39+ VIRTUAL_ENV="$(cd "$(dirname "${BASH_SOURCE:-$0}")/.." && pwd)"
40+ export VIRTUAL_ENV
41+
42+ _OLD_VIRTUAL_PATH="$PATH"
43+ PATH="$VIRTUAL_ENV/bin:$PATH"
44+ export PATH
45+
46+ if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT:-}" ] ; then
47+ _OLD_VIRTUAL_PS1="$PS1"
48+ PS1="($(basename "$VIRTUAL_ENV")) $PS1"
49+ export PS1
50+ fi
951EOF
1052
You can’t perform that action at this time.
0 commit comments