proper uv management

This commit is contained in:
2026-02-17 12:18:13 +09:00
parent af7fb2beaf
commit e05773450a
3 changed files with 16 additions and 2 deletions

4
.gitignore vendored
View File

@@ -3,6 +3,10 @@
__pycache__/
*.pyo
*.pyc
.venv/
# sacrificial
uv.lock
# configs
config/

10
pyproject.toml Normal file
View File

@@ -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",
]

View File

@@ -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" <<EOF