Skip to content

Conversation

@dmduran12
Copy link

Summary

This PR enables pyMC Repeater to be installed on non-Raspberry Pi Linux systems such as Luckfox Lyra Ultra W running Ubuntu.

Note: Supersedes PR #66 which had conflicts. This PR is based on the latest origin/dev.

Changes

Platform Detection

  • Simplified SPI detection: checks for /dev/spidev* directly instead of Pi-specific module checks
  • Platform-specific hints for raspi-config, luckfox-config, or generic error messages
  • Changed "Raspberry Pi" references to "device" for generality

Hardware Groups & Permissions

  • Only adds user to groups that exist on the system (prevents errors on non-Pi)
  • Creates gpio/spi groups if missing
  • Adds udev rules for GPIO and SPI access (0660 permissions)

Architecture Support

  • Fixed yq binary download for aarch64/arm64/armhf architectures
  • SPI status check now platform-agnostic

Python Package Installation

  • Uses python3 -m pip for consistent Python version targeting
  • Fallback for systems without --break-system-packages flag (older pip)
  • Parses dependencies from pyproject.toml with grep (handles broken setuptools_scm metadata)
  • Installs pymc_core from PyPI (git URL has broken metadata due to setuptools_scm)
  • Forces spidev to compile from source (--no-binary) for correct Python version
  • Explicitly installs hardware deps: spidev, python-periphery, pyserial, gpiod

Tested Platforms

  • Raspberry Pi (RPi OS)
  • Luckfox Lyra Ultra W (Ubuntu 22.04)
  • Generic x86_64 Linux with SPI (should work, not tested)

Breaking Changes

None - maintains full backward compatibility with Raspberry Pi installations.

Co-Authored-By: Warp agent@warp.dev

This enables pyMC Repeater to be installed on non-Raspberry Pi Linux systems
such as Luckfox Lyra Ultra W running Ubuntu.

## Changes

### Platform Detection
- Simplified SPI detection: checks for /dev/spidev* directly
- Platform-specific hints for raspi-config, luckfox-config, or generic
- Changed 'Raspberry Pi' references to 'device' for generality

### Hardware Groups & Permissions
- Only adds user to groups that exist on the system
- Creates gpio/spi groups if missing
- Adds udev rules for GPIO and SPI access (0660 permissions)

### Architecture Support
- Fixed yq binary download for aarch64/arm64/armhf architectures
- SPI status check now platform-agnostic

### Python Package Installation
- Uses python3 -m pip for consistent Python version targeting
- Fallback for systems without --break-system-packages flag
- Parses dependencies from pyproject.toml with grep
- Installs pymc_core from PyPI (git URL has broken metadata)
- Forces spidev to compile from source (--no-binary) for correct Python version
- Explicitly installs hardware deps: spidev, python-periphery, pyserial, gpiod

### Tested Platforms
- Raspberry Pi (RPi OS)
- Luckfox Lyra Ultra W (Ubuntu)
- Generic x86_64 Linux with SPI

Co-Authored-By: Warp <agent@warp.dev>
@dmduran12
Copy link
Author

spent a few hours massaging the installer to work on these lightweight Luckfox Lyra Ultras... it installs and works, but would love your eyes on the implementation. Did my best to "KISS"

@dmduran12
Copy link
Author

cleaned up conflicts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant