Skip to content

Commit 35319c4

Browse files
committed
Set DYLD search path for homebrew libusb on macOS
1 parent cb3b16f commit 35319c4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

bin/detect.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,15 @@
2121
2222
"""
2323

24+
import os
25+
import sys
26+
2427
import adafruit_platformdetect
2528

29+
# Needed to find libusb installed by homebrew on Apple Silicon
30+
if sys.platform == "darwin":
31+
os.environ["DYLD_FALLBACK_LIBRARY_PATH"] = "/opt/homebrew/lib/"
32+
2633
detector = adafruit_platformdetect.Detector()
2734

2835
print("Chip id: ", detector.chip.id)

0 commit comments

Comments
 (0)