How to sign + notarize Py GUI app?

Hi, I develop a desktop GUI application. This application is written in Python and is cross-platform. I have tried to sign and notarize the Mac .dmg installer for months, but for now without any success. Below I have prepared a small example of the kind of code I need to notarize and sign. Thanks in advance for your help!

Miloš

MVP: MVP (Minimum viable product) = pack .dmg + sign + notarize basic portable Py runtime (portable conda based) with “Hello world” in Tk runtime.

To create (and run) the MVP code, run this in console (requires echo, curl and .tar.xz compression support - usually built-in in MacOS):

cat > test.py << EOF
from tkinter import *
from tkinter import ttk
root = Tk()
frm = ttk.Frame(root, padding=10)
frm.grid()
ttk.Label(frm, text="Hello World!").grid(column=0, row=0)
ttk.Button(frm, text="Quit", command=root.destroy).grid(column=1, row=0)
root.mainloop()
EOF
curl https://files.sdat.solargis.com/venv3.9_mac_amd64.tar.xz | tar xvJf -
. ./venv3.9/bin/activate2
python test.py  # this runs the MVP app

Pls, I need to know HOW to create a signed + notarized .dmg installer of the program above in the automated way.

I have tried to sign and notarize the Mac .dmg installer for months, but for now without any success.

What is the issue that you are seeing?

Matt Eaton
DTS Engineering, CoreOS
meaton3@apple.com

I would recommend going back and examining how your final product will be produced. For example, are you building an app bundle with dylibs and executables nested inside of it, or are you only building a single executable? These things matter because they ultimately affect how your product is code signed and then sent to the Notary service. Can you provide a folder structure example on what your final product looks like? For example, if you have an app, can you provide something like this:

SDAT.app/
  Contents/
    _CodeSignature/
    Info.plist
    Frameworks/
      YourDylib1.dylib
      YourDylib2.dylib
    MacOS/
      SDAT
    PkgInfo
    Helpers/
      HelperExecutable
    Resources/

After your folder structure is known, then let's take a look at how your product is code signed.

Matt Eaton
DTS Engineering, CoreOS
meaton3@apple.com
How to sign &#43; notarize Py GUI app?
 
 
Q