2025-03-04 15:50:55 +01:00
|
|
|
# Activate local Python venv
|
|
|
|
function activate
|
|
|
|
# Set path to venv activation script
|
2025-03-05 08:10:17 +01:00
|
|
|
set -f target "./.venv/bin/activate.fish"
|
2025-03-04 15:50:55 +01:00
|
|
|
|
|
|
|
# create venv if it doesn't exist
|
|
|
|
if not test -e $target
|
|
|
|
python -m venv ./.venv
|
|
|
|
end
|
|
|
|
|
|
|
|
# activate venv
|
|
|
|
source $target
|
|
|
|
end
|