.
This commit is contained in:
parent
888b8ae98f
commit
de82cc15d6
1 changed files with 17 additions and 16 deletions
31
.envrc
31
.envrc
|
|
@ -2,28 +2,29 @@
|
||||||
|
|
||||||
# Check if .venv exists
|
# Check if .venv exists
|
||||||
if [[ -d ".venv" ]]; then
|
if [[ -d ".venv" ]]; then
|
||||||
# Activate the virtual environment
|
# Activate the virtual environment
|
||||||
export VIRTUAL_ENV="$PWD/.venv"
|
export VIRTUAL_ENV="$PWD/.venv"
|
||||||
export PATH="$VIRTUAL_ENV/bin:$PATH"
|
export PATH="$VIRTUAL_ENV/bin:$PATH"
|
||||||
|
|
||||||
|
# Verify we're using the right Python
|
||||||
|
if [[ -x "$VIRTUAL_ENV/bin/python" ]]; then
|
||||||
|
export PYTHONPATH="$PWD/src:$PYTHONPATH"
|
||||||
|
echo "Activated virtual environment: $VIRTUAL_ENV"
|
||||||
|
else
|
||||||
|
echo "Warning: Virtual environment Python not found"
|
||||||
|
fi
|
||||||
|
|
||||||
# Verify we're using the right Python
|
|
||||||
if [[ -x "$VIRTUAL_ENV/bin/python" ]]; then
|
|
||||||
export PYTHONPATH="$PWD/src:$PYTHONPATH"
|
|
||||||
echo "Activated virtual environment: $VIRTUAL_ENV"
|
|
||||||
else
|
|
||||||
echo "Warning: Virtual environment Python not found"
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
echo "Warning: No .venv directory found"
|
echo "Warning: No .venv directory found"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Run uv sync to update packages
|
# Run uv sync to update packages
|
||||||
if command -v uv &> /dev/null; then
|
if command -v uv &> /dev/null; then
|
||||||
echo "Running uv sync..."
|
echo "Running uv sync..."
|
||||||
uv sync
|
uv sync
|
||||||
echo "Packages updated successfully"
|
echo "Packages updated successfully"
|
||||||
else
|
else
|
||||||
echo "Warning: uv not found"
|
echo "Warning: uv not found"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Environment configured with direnv"
|
echo "Environment configured with direnv"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue