Default virtual environment location to .venv (#151181)

This commit is contained in:
Paulus Schoutsen
2025-08-26 09:44:04 +02:00
committed by GitHub
parent 1d2599184b
commit ee9abd519d
3 changed files with 7 additions and 6 deletions

View File

@@ -14,6 +14,7 @@ tests
# Other virtualization methods # Other virtualization methods
venv venv
.venv
.vagrant .vagrant
# Temporary files # Temporary files

View File

@@ -19,7 +19,7 @@ else
# other common virtualenvs # other common virtualenvs
my_path=$(git rev-parse --show-toplevel) my_path=$(git rev-parse --show-toplevel)
for venv in venv .venv .; do for venv in .venv venv .; do
if [ -f "${my_path}/${venv}/bin/activate" ]; then if [ -f "${my_path}/${venv}/bin/activate" ]; then
. "${my_path}/${venv}/bin/activate" . "${my_path}/${venv}/bin/activate"
break break

View File

@@ -18,11 +18,11 @@ mkdir -p config
if [ ! -n "$VIRTUAL_ENV" ]; then if [ ! -n "$VIRTUAL_ENV" ]; then
if [ -x "$(command -v uv)" ]; then if [ -x "$(command -v uv)" ]; then
uv venv venv uv venv .venv
else else
python3 -m venv venv python3 -m venv .venv
fi fi
source venv/bin/activate source .venv/bin/activate
fi fi
if ! [ -x "$(command -v uv)" ]; then if ! [ -x "$(command -v uv)" ]; then