We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bca1f10 commit 3353ec2Copy full SHA for 3353ec2
1 file changed
scripts/activate.sh
@@ -23,7 +23,10 @@ if [[ ! "$PYAV_LIBRARY" ]]; then
23
fi
24
export PYAV_LIBRARY
25
26
-if [[ ! "$PYAV_PYTHON" ]]; then
+if [[ "$VIRTUAL_ENV" ]]; then
27
+ PYAV_PYTHON="${VIRTUAL_ENV}/bin/python3"
28
+ echo "Using activated venv: $VIRTUAL_ENV"
29
+elif [[ ! "$PYAV_PYTHON" ]]; then
30
PYAV_PYTHON="${PYAV_PYTHON-python3}"
31
echo 'No $PYAV_PYTHON set; defaulting to python3.'
32
@@ -44,6 +47,9 @@ if [[ "$GITHUB_ACTION" ]]; then
44
47
# GitHub has a very self-contained environment. Lets just work in that.
45
48
echo "We're on CI, so not setting up another virtualenv."
46
49
50
+elif [[ "$VIRTUAL_ENV" ]]; then
51
+ # Using activated venv
52
+ true
53
else
54
55
export PYAV_VENV_NAME="$(uname -s).$(uname -r).$("$PYAV_PYTHON" -c '
0 commit comments