I created a python application using py2app and am able to code sign almost all the binaries using the command
find "${NAME}.app" -iname '*.so' -or -iname '*.dylib'| while read libfile; do codesign -s "${IDENTITY}" --timestamp -o runtime --entitlements entitlements.plist "${libfile}"; done;
However there are some binaries that are located in a directory in a zip file name.app/Contents/Resouces/lib/python37.zip/PIL/.dylibs
The problem is that these binaries don't get signed because they are located in a zip file. I have tried using Finder to unzip them and zip them back up so that I can code sign those binaries, but unzipping and zipping through Finder causes the program to no longer find the files in the zip.
Fatal Python error: initfsencoding: unable to load the file system codec
ModuleNotFoundError: No module named 'encodings'
Current thread 0x000000010bb5ee00 (most recent call first):
Abort trap: 6
Any help would be appreciated.
Selecting any option will automatically load the page