From the docs, a framework normally has a structure like that shown above, where (if A is the current version) the actual library would be:
The reason for the post is that I realized I've been overlooking something obvious: the existence of an
Info.plistfile. Just as we set the key:
NSPrincipalClass, to have the value:
SimpleMessagein our bundle (here), there is a key in the Python.framework:
This key is not required to be set for a framework (a framework doesn't have to contain any code), but if it is, you'd expect it to be the path to the executable. Although there is something in the Framework docs about this key must be the same as the name of the framework. So the executable should be:
As far as I can see, our best approach is still to snoop on the loader. And to solve the original problem (no PyObjC) by making sure that we're running System Python.