#!/bin/bash

# 1. Setup/Re-setup Virtual Environment

python3 -m venv venv

source venv/bin/activate

# 2. Downgrade pip to bypass the invalid metadata error in django-rest-auth-forked

pip install "pip<24.1"

# 3. Install requirements (now it will ignore the parenthesis error)

if [ -f "requirements.txt" ]; then

    pip install -r requirements.txt

else

    pip install django

fi

echo "Setup complete. Run 'source venv/bin/activate' to start working."
