From: Jory A. Pratt <geekypenguin@gmail.com>
Subject: [PATCH] Add Debian Trixie compatibility for pydub installation

This patch adds automatic detection and handling for pydub installation
on Debian Trixie systems where python3-pydub is not available due to
Python 3.13 removing the audioop module.

Changes:
- Removed direct python3-pydub installation via apt
- Added logic to detect if python3-pydub is available in system packages
- Falls back to installing audioop-lts and pydub via pip when system
  package is unavailable (required for Python 3.13 compatibility)

This ensures SkywarnPlus works correctly on both Debian Bookworm (where
python3-pydub is available) and Debian Trixie (where it must be
installed via pip).

---
diff --git a/swp-install b/swp-install
index acd6234..9e64c4b 100644
--- a/swp-install
+++ b/swp-install
@@ -111,7 +111,18 @@ install_dependencies() {
             apt install -y unzip python3 python3-pip ffmpeg
             pip3 install ruamel.yaml requests python-dateutil pydub
         else
-            apt install -y unzip python3 python3-pip ffmpeg python3-ruamel.yaml python3-requests python3-dateutil python3-pydub
+            # Check Debian version to determine if we need to install pydub via pip
+            # python3-pydub is not available in Debian 13 (Trixie) due to Python 3.13 compatibility
+            apt install -y unzip python3 python3-pip ffmpeg python3-ruamel.yaml python3-requests python3-dateutil
+            
+            # Try to install python3-pydub, if it fails (not available in Trixie), use pip instead
+            if apt install -y python3-pydub 2>/dev/null; then
+                echo "Installed python3-pydub from system packages"
+            else
+                echo "python3-pydub not available in system packages (likely Debian Trixie)"
+                echo "Installing audioop-lts and pydub via pip (required for Python 3.13 compatibility)"
+                pip3 install --break-system-packages audioop-lts pydub
+            fi
         fi
     elif [ "$OS" = "arch" ]; then
         pacman -Syu --noconfirm
