How to Notarize Python Apps for macOS (Python Guide)

pyinstaller --onefile your_script.py
python setup.py py2app
codesign --deep --force --verify --verbose \
--sign "Developer ID Application: Your Name (TEAMID)" \
YourApp.app
ditto -c -k --keepParent YourApp.app YourApp.zip

xcrun notarytool submit YourApp.zip \
--keychain-profile "YOUR_PROFILE" \
--wait
xcrun stapler staple YourApp.app