Pyinstaller python macos still shows code sign error after signing

Viewed 468

I tried to sign my code using following "entitlements.plist" :

    <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <!-- These are required for binaries built by PyInstaller -->
    <key>com.apple.security.cs.allow-jit</key>
    <true/>
    <key>com.apple.security.cs.allow-unsigned-executable-memory</key>
    <true/>
</dict>
</plist>

And following terminal command :

codesign --verify --force --verbose --entitlements entitlements_small.plist --sign="mykeychaincertname" -o runtime Launcher.app --deep

But still when I try to launch the application is shows the code certification error below for Python :

[17737] Error loading Python lib '/var/folders/5c/n8ccpjyj7w3g8b31vjn1qrbh0000gn/T/_MEIqAy2hm/Python': dlopen: dlopen(/var/folders/5c/n8ccpjyj7w3g8b31vjn1qrbh0000gn/T/_MEIqAy2hm/Python, 10): no suitable image found.  Did find:
    /var/folders/5c/n8ccpjyj7w3g8b31vjn1qrbh0000gn/T/_MEIqAy2hm/Python: code signature invalid for '/var/folders/5c/n8ccpjyj7w3g8b31vjn1qrbh0000gn/T/_MEIqAy2hm/Python'

    /var/folders/5c/n8ccpjyj7w3g8b31vjn1qrbh0000gn/T/_MEIqAy2hm/Python: stat() failed with errno=3

I'm using python 3.8 and Pyinstaller 4 on macOS 10.15.6

0 Answers
Related