Skip to content

Commit

Permalink
Support Homebrew on M1 Macs
Browse files Browse the repository at this point in the history
Homebrew installs to `/opt/homebrew/lib` on M1 Macs, instead of `/usr/local/lib` on Intel Macs.
Without disabling SIP (to set DYLD_FALLBACK_LIBRARY_PATH in env) or manually changing the `DEFAULT_LIBRARY_FALLBACK` before loading any third-party libraries (as proposed here: Kozea/CairoSVG#354 (comment)), libraries installed with homebrew can not be loaded.
  • Loading branch information
sebikeller authored Jun 7, 2022
1 parent 70690c7 commit 735a043
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Lib/ctypes/macholib/dyld.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def _dyld_shared_cache_contains_path(*args):

DEFAULT_LIBRARY_FALLBACK = [
os.path.expanduser("~/lib"),
"/opt/homebrew/lib",
"/usr/local/lib",
"/lib",
"/usr/lib",
Expand Down

0 comments on commit 735a043

Please sign in to comment.