-
Notifications
You must be signed in to change notification settings - Fork 47
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
(macOS BS) There are no Frameworks in /System/Library/Frameworks to be loaded with Pyobjc #309
Comments
With Python3 installed from command-line-tools:
|
I found this in https://mrmacintosh.com/whats-new-in-macos-big-sur-11-0-beta-1-20a4299v/
|
@LcTrKiD yup that is exactly what's going on. All the shared libraries are smashed into a dylib shared cache like on iOS. On macOS it can be found here: The code in
But the ideal solution should be to not check paths at all and instead try to load the dylib. If the dylib loading works then it's valid otherwise it must not exist. The entire dylib_shared_cache is loaded at startup and all dylibs just hang around in memory |
I’m going to diff _dyld.py with older versions since this works with system python and an old version of pyobjc |
We've fixed this temporarily in Dropbox via (roughly) the following swizzling:
This means pyobjc always |
The head of the trunk should work on BS with the commit I did a just now. I did a minimal fix based on Max's patch: Return the input path when it starts with "/System/" in "objc.pathForFramework". With this patch "import CoreServices" works for me (well, the same change in the installed version on the beta worked; there's a non-zero change that I botched copying this trivial change to the system I did the commit from). |
Time to close the issue. Note that the branch for pyobjc-7 has a more correct fix, but the difference in semantics shouldn't affect normal use of PyObjC and that fix will have to be changed again (it uses a private API that should be made public in the next beta). |
…ork loader (cherry picked from commit 29d76ac)
Using pyobjc from system python and PyObjc 6.2.1 (Python 3.8.3) when I try to import CoreServices framework it won't load because /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (and no other Framework) exist.
The text was updated successfully, but these errors were encountered: