title: How to build an mac os app from a python script having a PySide2 GUI?
body: <h3>Context:</h3>
  <p>I am developping a simple Python application using a PySide2 GUI. It currently works fine in Windows, Linux and Mac. On Windows, I could use PyInstaller and InnoSetup to build a simple installer. Then I tried to do the same thing on Mac. It soon broke, because the system refused to start the command or the app generated by PyInstaller because it was not correctly signed. And as I am not an apple developper, I cannot sign anything...</p>
  <p>After some research, I tried py2app. I can go one step further here. With</p>
  <pre><code>python setup.py py2app -A
  </code></pre>
  <p>I can create a runnable app. Which obviously cannot be ported to a different system because it uses my development folders. And if I use <code>python setup.py py2app</code> the generated program cannot start because py2app did not copy all the required Qt stuff. I tried to add one by one the missing libraries, but on the end the system could not find the plugins and I gave up...</p>
  <h3>Question:</h3>
  <p>Can someone help me with a recipe to convert a python script or package using a Qt GUI into a portable app on Mac? Ideally, the recipe should say how to use a custom application icon, but this is not required.</p>
  <h3>References:</h3>
  <ul>
  <li>Python 3.8.5</li>
  <li>macOS 10.15.7 Catalina</li>
  <li>PySide2 5.15.1</li>
  <li>PyInstaller 4.0</li>
  <li>py2app 0.22</li>
  </ul>
  <p>As my real package is too large for a SO question I trimmed it down to a minimal reproducible example:</p>
  <pre><code>from PySide3.QtWidgets import *
  import sys
  
  
  class MainWindow(QMainWindow):
      def __init__(self):
          super().__init__()
          hello = QLabel('Hello', self)
          hello.move(50, 50)
  
  def run(args):
      app = QApplication(args)
      main = MainWindow()
      main.show()
      sys.exit(app.exec_())
  
  
  if __name__ == '__main__':
      run(sys.argv)
  </code></pre>
  <p>And here is the setup.py file used for py2app:</p>
  <pre><code>from setuptools import setup
  
  APP = ['app.py']
  DATA_FILES = []
  OPTIONS = {}
  
  setup(
      app=APP,
      data_files=DATA_FILES,
      options={'py2app': OPTIONS},
      setup_requires=['py2app'],
  )
  </code></pre>