Ver código fonte

Fix Docker build: remove apt python3-lgpio, use pip lgpio instead

- python3-lgpio is only available in Raspberry Pi OS, not Debian
- lgpio from PyPI works in the Debian-based Docker image
- Replace RPi.GPIO with rpi-lgpio (drop-in replacement, works on Pi 4+5)
- Both RPi.GPIO and rpi-lgpio can't coexist (same module name)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
tuanchris 1 mês atrás
pai
commit
08fde35397
2 arquivos alterados com 7 adições e 9 exclusões
  1. 0 2
      Dockerfile
  2. 7 7
      requirements.txt

+ 0 - 2
Dockerfile

@@ -14,8 +14,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
         # GPIO/NeoPixel support for DW LEDs
         python3-dev python3-pip \
         libgpiod2 libgpiod-dev \
-        # lgpio for Pi 5 GPIO support (rpi-lgpio Python package depends on this)
-        python3-lgpio \
         scons \
         systemd \
         # Docker CLI for container self-restart/update

+ 7 - 7
requirements.txt

@@ -14,11 +14,11 @@ requests>=2.31.0
 Pillow
 aiohttp
 # GPIO/NeoPixel support for DW LEDs and Desert Compass
-# Pi 4 and earlier:
-RPi.GPIO>=0.7.1  # Required by Adafruit Blinka on Raspberry Pi and for reed switch
-rpi-ws281x>=5.0.0  # Low-level NeoPixel/WS281x driver
-adafruit-circuitpython-neopixel>=6.3.0
-Adafruit-Blinka>=8.0.0
-# Pi 5 support (uses PIO instead of PWM, rpi-lgpio replaces RPi.GPIO):
-rpi-lgpio>=0.4  # Drop-in replacement for RPi.GPIO on Pi 5
+# Note: rpi-lgpio is a drop-in replacement for RPi.GPIO that works on Pi 5
+# Do NOT install both RPi.GPIO and rpi-lgpio - they conflict
+lgpio>=0.2.2.0  # Low-level GPIO library (required by rpi-lgpio)
+rpi-lgpio>=0.4  # Provides RPi.GPIO interface, works on Pi 4 and Pi 5
+rpi-ws281x>=5.0.0  # Low-level NeoPixel/WS281x driver (Pi 4)
+adafruit-circuitpython-neopixel>=6.3.0  # Standard NeoPixel library (Pi 4)
+Adafruit-Blinka>=8.0.0  # CircuitPython compatibility layer
 Adafruit-Blinka-Raspberry-Pi5-Neopixel>=1.0.0  # Pi 5 PIO-based NeoPixel driver