Closed yanone closed 4 years ago
Update: I just looked up that NSPoint
is defined in the Foundation framework, but from Foundation import NSPoint
fails as well in the .app bundle (and not otherwise) with ImportError: cannot import name 'NSPoint' from 'Foundation' (unknown location)
My bad,
explicitly including the Foundation
package in the py2app bundle solved the problem. I misinterpreted the traceback, thinking that Foundation
is available, but NSPoint
isn't, when actually the whole module wasn't accessible somewhere.
Sorry for bothering, closing this.
Hellos,
I'm completely lost on this issue: It's from an app that's been packages with
py2app
and code signed as hardened runtime, with an entitlement forcom.apple.security.cs.allow-unsigned-executable-memory
.Some classes import fine from AppKit, others don't. Of the below code, only the last line throws the error:
Traceback:
ImportError: cannot import name 'NSPoint' from 'AppKit._AppKit' (/Users/yanone/Code/TypeWorldApp/dist/Type.World.app/Contents/Resources/lib/python3.7/AppKit/_AppKit.cpython-37m-darwin.so)
The same class imports fine outside of the .app, for instance in a normal Python shell. Any clues? Thank you!