Skip to content

Commit 3f8303f

Browse files
Remove Python 3.13 version cap on lgpio dependency
- Change lgpio requirement from 'lgpio;python_version<"3.13"' to 'lgpio>=0.2.2.0' so it installs on Python 3.13+ - Pin >=0.2.2.0 to avoid the broken empty stub (0.0.0.2) on piwheels - Remove unused yellow_text() function and raspberry_pi variable that were only used for the now-removed manual install warning - Remove post-install warning about manual lgpio installation The version cap was preventing lgpio from being installed on Python 3.13+ which broke GPIO on Raspberry Pi 5. The lgpio dependency is only included when running on Raspberry Pi hardware (checked via /proc/device-tree/compatible). Pre-built aarch64 wheels for Python 3.13 and 3.14 are available at: https://github.com/adafruit/lgpio-python-wheels Fixes #1016
1 parent 2551cd5 commit 3f8303f

1 file changed

Lines changed: 1 addition & 13 deletions

File tree

setup.py

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@
1717
here = os.path.abspath(os.path.dirname(__file__))
1818

1919

20-
def yellow_text(text: str) -> str:
21-
return f"\033[33m{text}\033[0m"
22-
23-
2420
# Import the README and use it as the long-description.
2521
# Note: this will only work if 'README.md' is present in your MANIFEST.in file!
2622
with io.open(os.path.join(here, "README.rst"), encoding="utf-8") as f:
@@ -33,7 +29,6 @@ def yellow_text(text: str) -> str:
3329
)
3430

3531
board_reqs = []
36-
raspberry_pi = False
3732
if os.path.exists("/proc/device-tree/compatible"):
3833
with open("/proc/device-tree/compatible", "rb") as f:
3934
compat = f.read()
@@ -51,11 +46,10 @@ def yellow_text(text: str) -> str:
5146
):
5247
board_reqs = [
5348
"rpi_ws281x>=4.0.0",
54-
"lgpio;python_version<'3.13'",
49+
"lgpio>=0.2.2.0",
5550
"RPi.GPIO",
5651
"Adafruit-Blinka-Raspberry-Pi5-Neopixel",
5752
]
58-
raspberry_pi = True
5953
# BeagleBone Black, Green, PocketBeagle, BeagleBone AI, etc.
6054
elif b"ti,am335x" in compat:
6155
board_reqs = ["Adafruit_BBIO"]
@@ -131,9 +125,3 @@ def yellow_text(text: str) -> str:
131125
],
132126
)
133127

134-
if raspberry_pi and os.sys.version_info >= (3, 13):
135-
print(
136-
yellow_text(
137-
"\n*** Raspberry Pi 5 and later: lgpio will need to be installed manually. See the lgpio homepage for more details: http://abyz.me.uk/lg/download.html ***"
138-
)
139-
)

0 commit comments

Comments
 (0)