Skip to content

Support homebrew libusb on macOS #223

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 7, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions adafruit_platformdetect/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,17 @@
"""
Attempt to detect the current platform.
"""
import os
import re
import sys
from typing import Optional

from .board import Board
from .chip import Chip

# Needed to find libs (like libusb) installed by homebrew on Apple Silicon
if sys.platform == "darwin":
os.environ["DYLD_FALLBACK_LIBRARY_PATH"] = "/opt/homebrew/lib/"

# Various methods here may retain state in future, so tell pylint not to worry
# that they don't use self right now:
Expand Down