4 ms·
How does this package layout interface with code signing and bundle IDs? My main project uses a custom-setup ".app" bundle on Mac OS X (combining both a pure P
by makecheck 11y ago
How does this package layout interface with code signing and bundle IDs?
My main project uses a custom-setup ".app" bundle on Mac OS X (combining both a pure Python front-end and C++ bindings) and I've found that it does require a bit of care to see correct behavior.
For instance I found that El Capitán seems to really hate symbolic links now and will consider a code-sign tainted if there is an outside symbolic link (at least, for certain link destinations?).
And I found, at least on older Mac versions, that system calls would sometimes think my application was Python and assume the Python bundle ID instead of my own, if I simply ran Python itself. Whereas, after I included a built binary directly in the MacOS folder that essentially says "int main(int argc, char* argv[]) { return Py_Main(argc, argv); }", it was fine.
I wanted to run the system Python by reference and not bloat my executable; the call-Py_Main() approach worked well for that, too.
- metachris 11y agoThanks for the thought! I haven't tried it, but this post [1] describes a project that got everything to work with the Mac App Store. [1] http://dafoster.net/articles/2014/06/24/submitting-a-python-app-to-the-mac-app-store/ http://dafoster.net/articles/2014/06/24/submitting-a-python-...
- jsjohnst 11y agoDo you happen to have a repo for this app you speak of? Would love to take a look!
- makecheck 11y agoYep. :) It's "MacTerm": https://github.com/kmgrant/macterm The Python front-end is mostly here: https://github.com/kmgrant/macterm/tree/master/Build/Application/PythonCode The ".app" bundle layout is constructed as part of the build: https://github.com/kmgrant/macterm/blob/master/Build/GNUmakefile ...but basically it puts Python scripts and a Python-runner into "MacOS", and Python and C++ libraries into "Frameworks". You could also download the built ".app" to see the final layout. This is actually quite a bit simpler than it used to be. In the old days I was able to support both PowerPC and Intel, multiple versions of Python and about 6 different old Mac OS X versions in the same bundle. I still can't quite believe that it worked. :)
- jsjohnst 11y agoAwesome! Thanks for sharing, will definitely dig through this. :)