mirror of
https://codeberg.org/diginaut/dotfiles.git
synced 2026-02-04 07:40:27 +01:00
Use specific Python version if requested
This commit is contained in:
@@ -5,7 +5,13 @@ layout_uv() {
|
|||||||
|
|
||||||
if [[ -z $VIRTUAL_ENV || ! -d $VIRTUAL_ENV ]]; then
|
if [[ -z $VIRTUAL_ENV || ! -d $VIRTUAL_ENV ]]; then
|
||||||
log_status "No virtual environment exists. Executing \`uv venv\` to create one."
|
log_status "No virtual environment exists. Executing \`uv venv\` to create one."
|
||||||
|
if [[ -z $PYTHON_VERSION ]]; then
|
||||||
|
# No Python version specified, just create a virtualenv
|
||||||
uv venv
|
uv venv
|
||||||
|
else
|
||||||
|
# Specific Python version requested, use that; will download if needed
|
||||||
|
uv venv --python $PYTHON_VERSION
|
||||||
|
fi
|
||||||
VIRTUAL_ENV="$(pwd)/.venv"
|
VIRTUAL_ENV="$(pwd)/.venv"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user