diff --git a/README.md b/README.md index 05908d3..5ab86a7 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/install.sh b/install.sh index cd54605..2cb71e2 100755 --- a/install.sh +++ b/install.sh @@ -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" diff --git a/tests/test_installer.sh b/tests/test_installer.sh index dd6378b..43fa6bb 100755 --- a/tests/test_installer.sh +++ b/tests/test_installer.sh @@ -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 ""