forked from Shinonome/alt-illogical-impulse
Don't nuke venv on activation - preserve installed packages
This commit is contained in:
@@ -21,10 +21,12 @@ let
|
|||||||
# Create directory structure
|
# Create directory structure
|
||||||
mkdir -p "$(dirname "$VENV_PATH")"
|
mkdir -p "$(dirname "$VENV_PATH")"
|
||||||
|
|
||||||
# Remove existing venv if it exists
|
# Only create venv if it doesn't exist
|
||||||
if [[ -d "$VENV_PATH" ]]; then
|
if [[ ! -d "$VENV_PATH" ]]; then
|
||||||
echo "🗑️ Removing existing virtual environment..."
|
echo "🏗️ Creating Python 3.12 virtual environment..."
|
||||||
rm -rf "$VENV_PATH"
|
${pkgs.python312}/bin/python -m venv "$VENV_PATH" --prompt .venv
|
||||||
|
else
|
||||||
|
echo "✅ Virtual environment already exists at $VENV_PATH"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Set up proper library path for Python packages (64-bit only)
|
# Set up proper library path for Python packages (64-bit only)
|
||||||
@@ -48,10 +50,6 @@ let
|
|||||||
|
|
||||||
echo "📚 Library path: $LD_LIBRARY_PATH"
|
echo "📚 Library path: $LD_LIBRARY_PATH"
|
||||||
|
|
||||||
# Create virtual environment with Python 3.12 (installer requirement)
|
|
||||||
echo "🏗️ Creating Python 3.12 virtual environment..."
|
|
||||||
${pkgs.python312}/bin/python -m venv "$VENV_PATH" --prompt .venv
|
|
||||||
|
|
||||||
# Activate and install exact requirements from installer
|
# Activate and install exact requirements from installer
|
||||||
echo "📦 Installing Python packages with proper library linking..."
|
echo "📦 Installing Python packages with proper library linking..."
|
||||||
source "$VENV_PATH/bin/activate"
|
source "$VENV_PATH/bin/activate"
|
||||||
|
|||||||
Reference in New Issue
Block a user