From e05773450a8ecd9badd9b9bb147559fdd4e34b71 Mon Sep 17 00:00:00 2001 From: Mikkeli Matlock Date: Tue, 17 Feb 2026 12:18:13 +0900 Subject: [PATCH] proper uv management --- .gitignore | 4 ++++ pyproject.toml | 10 ++++++++++ scripts/setup.sh | 4 ++-- 3 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 pyproject.toml diff --git a/.gitignore b/.gitignore index 469bbce..c4bc43a 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,10 @@ __pycache__/ *.pyo *.pyc +.venv/ + +# sacrificial +uv.lock # configs config/ diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..fe9b5d6 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,10 @@ +[project] +name = "pi-dashboard-server" +version = "0.1.0" +description = "WebSocket servers for the ESP32-S3 RLCD dashboard" +requires-python = ">=3.10" +dependencies = [ + "websockets>=12.0", + "psutil>=5.9.0", + "Pillow>=10.0", +] diff --git a/scripts/setup.sh b/scripts/setup.sh index a5f531b..0281476 100755 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -7,8 +7,8 @@ PROJECT_DIR="$(cd "$(dirname "$0")/.." && pwd)" UNIT_FILE="/etc/systemd/system/${SERVICE_NAME}.service" RUN_USER="$(whoami)" -echo "==> Installing Python dependencies..." -uv pip install -r "${PROJECT_DIR}/requirements.txt" +echo "==> Syncing Python dependencies..." +uv sync --project "${PROJECT_DIR}" echo "==> Generating systemd unit file..." cat > "/tmp/${SERVICE_NAME}.service" <