PyInstallerでPyQt5アプリをmacのアプリケーションバンドル化する

PyInstallerは5.1を使う必要があった
stackoverflow.com

pip install pyinstaller==5.1

Qtアプリ

from PyQt5 import QtWidgets

import sys

class MainWindow(QtWidgets.QMainWindow):

    def __init__(self):
        super().__init__()

        self.setWindowTitle("Hello World")
        l = QtWidgets.QLabel("My simple app.")
        l.setMargin(10)
        self.setCentralWidget(l)
        self.show()

if __name__ == '__main__':
    app = QtWidgets.QApplication(sys.argv)
    w = MainWindow()
    app.exec()

pyinstallerを実行

pyinstaller --windowed app.py

自分の環境だとpyinstallerのスクリプトを直さないといけなかった
/usr/local/bin/pyinstaller

(中略)
# 以下のPyInstallerのバージョンを5.1に指定する
sys.exit(
   load_entry_point('PyInstaller==5.1', 'console_scripts', 'pyinstaller')()
)