From 8fa3aca85dbcf7e2375d8b4017188839ee4bcad5 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 30 May 2026 11:42:48 +0000 Subject: [PATCH] Add run.sh to handle venv setup automatically Creates .venv on first run, installs dependencies, then starts the server. Subsequent runs skip straight to starting. Avoids externally-managed-environment errors on Debian/Ubuntu 12+. https://claude.ai/code/session_01JuRTR5Xjx8emQsyerBgGU7 --- run.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 run.sh diff --git a/run.sh b/run.sh new file mode 100644 index 0000000..ee2a740 --- /dev/null +++ b/run.sh @@ -0,0 +1,15 @@ +#!/bin/bash +# Run ClubLedger – creates a virtualenv on first run, then starts the server. +set -e + +VENV=".venv" + +if [ ! -d "$VENV" ]; then + echo "Creating virtual environment..." + python3 -m venv "$VENV" + echo "Installing dependencies..." + "$VENV/bin/pip" install --quiet -r requirements.txt + echo "Done." +fi + +exec "$VENV/bin/python" main.py "$@"