View OSX Code Signing and Notarization
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Salt has been building OSX packages for many years now. We have been signing the installer (``.pkg``) files with a Developer ID Installer certificate. Apple now requires some additional signing and notarization in addition to signing the installer. This will allow the installer and Salt software to pass the gate keeper. I believe the process is as follows. | |
1. Build the app | |
2. Sign all the binaries in the app (python, pip, salt-*, etc) with the Developer ID Application certificate and use a secure timestamp | |
3. Build the package (I believe ours is a flat installer) | |
4. Sign the package with the Developer ID Installer certificate | |
5. Submit the installer for notarization | |
6. Staple the notarization to the package | |
This requires the use of new tooling |
View PyMySQL, Shorter...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import third party libs | |
try: | |
# Try to import MySQLdb | |
import MySQLdb | |
HAS_MYSQLDB = True | |
except ImportError: | |
try: | |
# MySQLdb import failed, try to import PyMySQL | |
import pymysql | |
pymysql.install_as_MySQLdb() |