fix: skip python-gobject on Arch to avoid PyGObject version conflict
Arch Linux has PyGObject 3.54.5 in python-gobject package, but bluezero requires PyGObject <3.52.0, causing pip to fail when trying to replace the system version. Solution: Don't install python-gobject system package on Arch. Let pip compile the compatible PyGObject version (3.50.2) instead. Changes: - install.sh: Remove python-gobject from Arch pacman install - install.sh: Add explanatory warning about PyGObject compilation - tests/test_installer.sh: Don't check for python-gobject on Arch - tests/test_installer.sh: Add comment explaining why it's skipped - tests/test_installer.sh: Update summary for Arch (PyGObject compiled) - README.md: Remove python-gobject from Arch instructions - README.md: Explain version incompatibility and compilation requirement Result: - Debian/Ubuntu: All system packages, zero compilation (~1 min) - Arch Linux: System packages + PyGObject compilation (~2-3 min) Trade-off accepted: Arch users get longer install time in exchange for compatibility with bluezero's PyGObject version requirement. Fixes: error: uninstall-no-record-file (PyGObject 3.54.5 conflict) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
ee01132ea1
commit
44752c4d36
3 changed files with 17 additions and 16 deletions
|
|
@ -57,17 +57,16 @@ sudo apt-get install python3-pip python3-gi python3-dbus python3-cairo bluez
|
|||
|
||||
**Arch Linux:**
|
||||
```bash
|
||||
sudo pacman -S base-devel python-pip python-gobject python-dbus python-cairo bluez bluez-utils
|
||||
sudo pacman -S base-devel python-pip python-dbus python-cairo bluez bluez-utils
|
||||
```
|
||||
|
||||
**Why these packages?**
|
||||
- `base-devel`: Build tools (gcc, make, etc.) required for compiling PyGObject from pip
|
||||
- `python-gobject`: Python bindings for GObject (system package, but pip may still compile PyGObject)
|
||||
- `base-devel`: Build tools (gcc, make, meson) required for compiling PyGObject from pip
|
||||
- `python-dbus`: D-Bus Python bindings for BlueZ communication
|
||||
- `python-cairo`: Cairo graphics library (PyGObject dependency)
|
||||
- `python-cairo`: Cairo graphics library
|
||||
- `bluez` / `bluez-utils`: Bluetooth stack and utilities for Linux
|
||||
|
||||
**Note for Arch users:** Unlike Debian/Ubuntu where all dependencies use pre-compiled system packages, Arch requires some compilation due to pip/system package integration differences. The bluezero pip package may compile PyGObject from source even when python-gobject is installed.
|
||||
**Note for Arch users:** PyGObject is intentionally NOT installed as a system package on Arch due to version incompatibility (Arch has 3.54.5, but bluezero requires <3.52.0). Instead, pip will compile the compatible PyGObject version (3.50.2) during installation. This adds ~2 minutes to installation time but ensures compatibility.
|
||||
|
||||
#### 2. Install Python Dependencies
|
||||
|
||||
|
|
|
|||
11
install.sh
11
install.sh
|
|
@ -226,18 +226,19 @@ if command -v apt-get &> /dev/null; then
|
|||
elif command -v pacman &> /dev/null; then
|
||||
# Arch Linux
|
||||
print_info "Detected Arch Linux"
|
||||
echo "Installing: base-devel python-pip python-gobject python-dbus python-cairo bluez bluez-utils"
|
||||
print_warning "Note: base-devel required for compiling bluezero dependencies (PyGObject from pip)"
|
||||
echo "Installing: base-devel python-pip python-dbus python-cairo bluez bluez-utils"
|
||||
print_warning "Note: PyGObject will be compiled from pip due to version requirements (bluezero needs <3.52.0, Arch has 3.54.5)"
|
||||
# Use sudo only if not running as root
|
||||
if [ "$EUID" -eq 0 ]; then
|
||||
# Sync package database first (may have been synced in basic prereqs, but ensure it's current)
|
||||
pacman -Sy --noconfirm
|
||||
pacman -S --needed --noconfirm base-devel python-pip python-gobject python-dbus python-cairo bluez bluez-utils
|
||||
# Skip python-gobject to avoid version conflict - pip will compile PyGObject
|
||||
pacman -S --needed --noconfirm base-devel python-pip python-dbus python-cairo bluez bluez-utils
|
||||
else
|
||||
sudo pacman -Sy --noconfirm
|
||||
sudo pacman -S --needed --noconfirm base-devel python-pip python-gobject python-dbus python-cairo bluez bluez-utils
|
||||
sudo pacman -S --needed --noconfirm base-devel python-pip python-dbus python-cairo bluez bluez-utils
|
||||
fi
|
||||
print_success "System dependencies installed (using pre-compiled system packages where available)"
|
||||
print_success "System dependencies installed (PyGObject will be compiled from pip)"
|
||||
else
|
||||
print_warning "Could not detect package manager"
|
||||
print_info "Please manually install: BlueZ 5.x, python3-dbus"
|
||||
|
|
|
|||
|
|
@ -74,8 +74,8 @@ if [ "$OS_TYPE" = "debian" ]; then
|
|||
check_package bluez
|
||||
echo " ✓ bluez installed"
|
||||
elif [ "$OS_TYPE" = "arch" ]; then
|
||||
check_package python-gobject
|
||||
echo " ✓ python-gobject installed"
|
||||
# Note: python-gobject NOT installed on Arch to avoid version conflict
|
||||
# PyGObject compiled from pip instead
|
||||
check_package python-dbus
|
||||
echo " ✓ python-dbus installed"
|
||||
check_package python-cairo
|
||||
|
|
@ -163,10 +163,11 @@ if [ "$OS_TYPE" = "debian" ]; then
|
|||
echo " • System packages: python3, python3-pip, git, python3-gi, python3-dbus, python3-cairo, bluez"
|
||||
echo " • Pip packages: rns, bleak, bluezero"
|
||||
echo " • Install method: System packages (no compilation)"
|
||||
echo " • Installation time: < 1 minute"
|
||||
elif [ "$OS_TYPE" = "arch" ]; then
|
||||
echo " • System packages: python, python-pip, git, python-gobject, python-dbus, python-cairo, bluez, bluez-utils, base-devel"
|
||||
echo " • Pip packages: rns, bleak, bluezero (PyGObject compiled during bluezero install)"
|
||||
echo " • Install method: System packages + compilation (base-devel provides build tools)"
|
||||
echo " • System packages: python, python-pip, git, python-dbus, python-cairo, bluez, bluez-utils, base-devel"
|
||||
echo " • Pip packages: rns, bleak, bluezero, PyGObject (compiled)"
|
||||
echo " • Install method: System packages + PyGObject compilation (version compatibility)"
|
||||
echo " • Installation time: ~2-3 minutes (PyGObject compilation)"
|
||||
fi
|
||||
echo " • Installation time: Fast (< 2 minutes on Debian/Ubuntu, ~3 minutes on Arch)"
|
||||
echo ""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue