fix: add base-devel to Arch Linux for PyGObject compilation

Arch Linux has unique pip/system package integration where pip doesn't
recognize system python-gobject as satisfying PyGObject dependency,
causing bluezero to try compiling PyGObject from source.

Solution: Install base-devel on Arch to provide build tools (gcc, make, meson)

Changes:
- install.sh: Add base-devel to Arch system dependencies
- install.sh: Add note explaining why build tools needed on Arch
- install.sh: Use --needed flag to skip already installed packages
- README.md: Document base-devel requirement for Arch users
- README.md: Explain Arch vs Debian/Ubuntu compilation differences
- tests/test_installer.sh: Expect build tools on Arch (verify base-devel installed)
- tests/test_installer.sh: Update summary to reflect Arch compilation

Rationale:
- AUR python-bluezero is outdated (v0.9.0 vs pip v0.9.1)
- AUR package has 0 votes (rarely used by community)
- base-devel commonly installed on Arch systems anyway
- Keeps latest bluezero version
- Simpler than full AUR integration

Impact:
- Debian/Ubuntu: No compilation (< 1 min install)
- Arch Linux: Some compilation (~3 min install)
- Still faster than compiling everything on Debian

Fixes Arch Linux CI failure: "Unknown compiler(s): gcc not found"

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
torlando-tech 2025-10-28 21:39:57 -04:00
commit ee01132ea1
3 changed files with 25 additions and 25 deletions

View file

@ -57,14 +57,17 @@ sudo apt-get install python3-pip python3-gi python3-dbus python3-cairo bluez
**Arch Linux:**
```bash
sudo pacman -S python-pip python-gobject python-dbus python-cairo bluez bluez-utils
sudo pacman -S base-devel python-pip python-gobject python-dbus python-cairo bluez bluez-utils
```
**Why these packages?**
- `python3-gi` / `python-gobject`: Pre-compiled PyGObject bindings (avoids lengthy compilation)
- `python3-dbus` / `python-dbus`: D-Bus Python bindings for BlueZ communication
- `python3-cairo` / `python-cairo`: Cairo graphics library (PyGObject dependency)
- `bluez`: Bluetooth stack for Linux
- `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)
- `python-dbus`: D-Bus Python bindings for BlueZ communication
- `python-cairo`: Cairo graphics library (PyGObject dependency)
- `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.
#### 2. Install Python Dependencies

View file

@ -226,17 +226,18 @@ if command -v apt-get &> /dev/null; then
elif command -v pacman &> /dev/null; then
# Arch Linux
print_info "Detected Arch Linux"
echo "Installing: python-pip python-gobject python-dbus python-cairo bluez bluez-utils"
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)"
# 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 --noconfirm python-pip python-gobject python-dbus python-cairo bluez bluez-utils
pacman -S --needed --noconfirm base-devel python-pip python-gobject python-dbus python-cairo bluez bluez-utils
else
sudo pacman -Sy --noconfirm
sudo pacman -S --noconfirm python-pip python-gobject python-dbus python-cairo bluez bluez-utils
sudo pacman -S --needed --noconfirm base-devel python-pip python-gobject python-dbus python-cairo bluez bluez-utils
fi
print_success "System dependencies installed (using pre-compiled system packages)"
print_success "System dependencies installed (using pre-compiled system packages where available)"
else
print_warning "Could not detect package manager"
print_info "Please manually install: BlueZ 5.x, python3-dbus"

View file

@ -111,9 +111,9 @@ python3 -c "import bluezero; print(' ✓ bluezero imported successfully')" || {
echo ""
# Check that no build tools were required (verify we didn't compile anything)
echo "Verifying no build dependencies were required..."
# Check build tools status
if [ "$OS_TYPE" = "debian" ]; then
echo "Verifying no build dependencies were required..."
if dpkg -l | grep -q meson; then
echo " ⚠ WARNING: meson was installed (should not be needed)"
fi
@ -123,18 +123,12 @@ if [ "$OS_TYPE" = "debian" ]; then
if dpkg -l | grep -q libglib2.0-dev; then
echo " ⚠ WARNING: libglib2.0-dev was installed (should not be needed)"
fi
echo " ✓ No build tools required"
elif [ "$OS_TYPE" = "arch" ]; then
if pacman -Q meson &> /dev/null; then
echo " ⚠ WARNING: meson was installed (should not be needed)"
fi
if pacman -Q cmake &> /dev/null; then
echo " ⚠ WARNING: cmake was installed (should not be needed)"
fi
if pacman -Q glib2 &> /dev/null; then
echo " ⚠ WARNING: glib2 dev headers were installed (should not be needed)"
fi
echo "Verifying build tools installed (required on Arch for PyGObject compilation)..."
check_package base-devel
echo " ✓ base-devel installed (includes gcc, make, etc.)"
fi
echo " ✓ No build tools required"
echo ""
@ -167,10 +161,12 @@ echo " • install.sh is fully self-contained (handles all prerequisites)"
echo " • Reticulum Network Stack: installed via pip"
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)"
elif [ "$OS_TYPE" = "arch" ]; then
echo " • System packages: python, python-pip, git, python-gobject, python-dbus, python-cairo, bluez, bluez-utils"
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)"
fi
echo " • Pip packages: rns, bleak, bluezero"
echo " • Install method: System packages for compiled deps (no build tools needed)"
echo " • Installation time: Fast (< 2 minutes)"
echo " • Installation time: Fast (< 2 minutes on Debian/Ubuntu, ~3 minutes on Arch)"
echo ""