Add pip installation handling for Debian 12+ restrictions

Co-authored-by: ShaYmez <76499782+ShaYmez@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2025-12-13 01:13:59 +00:00
parent 379ac8ad1a
commit 89ade8cf14
2 changed files with 16 additions and 4 deletions

View File

@ -3,6 +3,8 @@ Debian 10 / 11 / 12 / 13 (Trixie) Support!!
=======
This is a multi-arch docker installer for HBlink3 and HBmonV2 combined for Debian 10, 11, 12, and 13 (Trixie).
**Note:** Debian 12 (Bookworm) and 13 (Trixie) support has been added with proper handling of pip installation restrictions and docker-compose compatibility.
![HBlink](img/HBLINK_logoV1.png "HBlink")
## Additional Features

View File

@ -194,9 +194,19 @@ echo "--------------------------------------------------------------------------
echo "Installing HBMonv2 configuration....."
echo "------------------------------------------------------------------------------"
sleep 2
pip3 install setuptools wheel
pip3 install -r requirements.txt
pip3 install attrs --force
# Handle pip installation for different Debian versions
if [ $VERSION -ge 12 ]; then
# For Debian 12+, use --break-system-packages flag or virtual environment
echo "Detected Debian 12+, using appropriate pip installation method..."
pip3 install --break-system-packages setuptools wheel 2>/dev/null || pip3 install setuptools wheel
pip3 install --break-system-packages -r requirements.txt 2>/dev/null || pip3 install -r requirements.txt
pip3 install --break-system-packages attrs --force 2>/dev/null || pip3 install attrs --force
else
# For Debian 10-11, use standard pip installation
pip3 install setuptools wheel
pip3 install -r requirements.txt
pip3 install attrs --force
fi
echo Install /opt/HBMonv2/config.py ...
cat << EOF > /opt/HBMonv2/config.py
CONFIG_INC = True # Include HBlink stats