1
0
mirror of https://codeberg.org/diginaut/dotfiles.git synced 2026-02-04 10:00:27 +01:00

Use specific Python version if requested

This commit is contained in:
2026-01-02 13:25:54 +01:00
parent ba6dbcd66c
commit 569a58ed3c

View File

@@ -5,7 +5,13 @@ layout_uv() {
if [[ -z $VIRTUAL_ENV || ! -d $VIRTUAL_ENV ]]; then
log_status "No virtual environment exists. Executing \`uv venv\` to create one."
uv venv
if [[ -z $PYTHON_VERSION ]]; then
# No Python version specified, just create a virtualenv
uv venv
else
# Specific Python version requested, use that; will download if needed
uv venv --python $PYTHON_VERSION
fi
VIRTUAL_ENV="$(pwd)/.venv"
fi