Open
Conversation
- Add get_pkg_manager() method using shutil.which() - Add PACMAN_DEPENDENCIES and PACMAN_DEP_MAP class attributes - Branch install_build_dep() and install_apt_dep() on pkg manager - Map apt package names to pacman equivalents - Skip unmapped packages with warning on Arch
- Add package manager detection (apt-get vs pacman) - Skip apt fast-path on Arch (no pacman equivalent for liblgpio-dev) - Add pacman build dependency path for source compilation - python3-dev bundled in python, python3-setuptools -> python-setuptools - Source compilation path unchanged (distro-agnostic)
- Add package manager detection (apt-get vs pacman) - Wrap entire Debian APT repo/GPG key setup in apt branch - Skip repo setup on Arch — influxdb available directly via pacman - Add comments explaining why the skip is safe
- Import shutil alongside existing os import - Branch apt-get purge on distro detection - Use pacman -Rns as equivalent of apt-get purge on Arch - -Rns: remove package, drop config files, remove unneeded deps
- Label existing apt block as Debian/Ubuntu for clarity - Add Arch/Manjaro prerequisites block with pacman commands - Note base-devel and swig required for lgpio source compilation
python-gpiozero is not in official Arch repos (AUR only). gpiozero is installed via pip into the venv so the system package is not required on Arch. Falls through to skip-with-warning.
/usr/local/lib is not in Arch's default linker search path unlike Debian. Add /etc/ld.so.conf.d/lgpio.conf before ldconfig so liblgpio.so.1 is findable at runtime after source compilation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The pironman5 installer unconditionally uses
apt-get, which is not available onArch-based systems (Arch Linux ARM, Manjaro ARM, EndeavourOS ARM). This PR adds
distro detection and pacman-based installation paths so pironman5 can be installed
on Arch/Manjaro alongside the existing Debian/Ubuntu support.
Changes
get_pkg_manager()detection method,PACMAN_DEPENDENCIESandPACMAN_DEP_MAPclass attributes, and branchinstall_build_dep()andinstall_apt_dep()on distrofast-path on Arch (no pre-built package available); register
/usr/local/libwith dynamic linker so
liblgpio.so.1is findable at runtimeinfluxdb is available directly via
pacman -S influxdbpacman -Rns --noconfirmas equivalent ofapt-get purgeDebian/Ubuntu instructions
Test Environment
linux-rpi6.18.xTest Results
pacman -Rns influxdbworks correctlyNotes
python3-gpiozerohas no official Arch repo equivalent (AUR only); skippedwith warning since
gpiozerois installed via pip into the venvpython3-devis bundled in Arch'spythonpackage; skipped with warningPACMAN_DEP_MAPintools/sf_installer.py— update this dict if dependencies changewait_for_dpkg.shrequires no changes — it exits cleanly on Arch since dpkglock files do not exist