Skip to content
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

Add hardcoded paths to macOS frameworks for Big Sur compatibility. #1905

Merged
merged 9 commits into from
Jul 19, 2020

Commits on Jul 16, 2020

  1. Add hardcoded paths to macOS frameworks for Big Sur compatibility.

    ctypes.util.find_library is checking for the presence of the framework
    files, which will fail due to macOS Big Sur's "dynamic linker cache".
    Since these files really can't be anywhere else, we just hardcode the
    path and load them.
    
    See: https://developer.apple.com/documentation/macos-release-notes/macos-big-sur-11-beta-release-notes
    (relevent excerpt provided below)
    
    This update takes the approach of leaving the existing behavior as is
    for macOS 10.8 (lowest supported version) through 10.15.
    
    Allegedly Apple is going to number Big Sur as macOS 11, although right
    now the beta returns a version of "10.16", so this code handles both as
    being greater than or equal to "10.16".
    
    | New in macOS Big Sur 11 beta, the system ships with a built-in dynamic
    linker cache of all system-provided libraries. As part of this change,
    copies of dynamic libraries are no longer present on the filesystem.
    Code that attempts to check for dynamic library presence by looking for
    a file at a path or enumerating a directory will fail. Instead, check
    for library presence by attempting to dlopen() the path, which will
    correctly check for the library in the cache. (62986286)
    sheagcraig committed Jul 16, 2020
    Configuration menu
    Copy the full SHA
    3e003a7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c3d5e56 View commit details
    Browse the repository at this point in the history
  3. Just use hardcoded paths for Security and CoreFoundation libs.

    This should never be anything but these paths. Instead of checking for
    `os.path.isfile` with `ctypes.util.find_library`, we just try to load
    with `ctypes.CDLL` and catch the `OSError` if it fails, add context, and
    reraise.
    sheagcraig committed Jul 16, 2020
    Configuration menu
    Copy the full SHA
    895f11f View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6508362 View commit details
    Browse the repository at this point in the history

Commits on Jul 17, 2020

  1. Bail early on non-macOS.

    sheagcraig committed Jul 17, 2020
    Configuration menu
    Copy the full SHA
    0f8d2fa View commit details
    Browse the repository at this point in the history

Commits on Jul 19, 2020

  1. Configuration menu
    Copy the full SHA
    f63062b View commit details
    Browse the repository at this point in the history
  2. ImportError

    sethmlarson committed Jul 19, 2020
    Configuration menu
    Copy the full SHA
    5efec6a View commit details
    Browse the repository at this point in the history
  3. OSError

    sethmlarson committed Jul 19, 2020
    Configuration menu
    Copy the full SHA
    43416bc View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d57db89 View commit details
    Browse the repository at this point in the history