Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

codesigning with auto-py-to-exe takes ages #412

Closed
gernophil opened this issue Aug 10, 2023 · 12 comments
Closed

codesigning with auto-py-to-exe takes ages #412

gernophil opened this issue Aug 10, 2023 · 12 comments
Assignees
Labels

Comments

@gernophil
Copy link

I've ported an app based on Python from Windows to macOS. I can run the app from command line and I was also able to make an .app file an start it on my mac using auto-py-to-exe. Now I want to codesign (and later notarize) it. To do so I set the codesign_identity option of auto-py-to-exe to my Developer ID Application and rerun it. After 2 days it was still running (and I guess collecting information on submodules of the used Python modules). Without the codesigning it takes about 5-10 minutes to build. Any ideas how I could accelerate this or what is happening here? Unfortunately, I am not able to copy the output of auto-py-to-exe while it is still running.

Thanks :).

@gernophil gernophil added the bug Something isn't working label Aug 10, 2023
@github-actions
Copy link

👋 Hi, just a reminder that if you haven't read the help post yet, give it a read to see if your issue is covered in it and make sure to follow the debugging section.

Also please note, as stated in the README, if your issue is only associated with your application and not auto-py-to-exe itself, please do not create an issue in this repository - instead, comment on the help post, video or create a new discussion.

@brentvollebregt
Copy link
Owner

I don't own a Mac myself so I am going to be 0 help on this.

What I can recommend, is for you to run the "Current Command" outside of auto-py-to-exe - does doing this solve the issue? If not, it will be a PyInstaller issue, if it is, it will be an auto-py-to-exe issue (depending on what fails).

@gernophil
Copy link
Author

Thanks for the reply. I'll try it with the PyInstaller command that auto-py-to-exe states and then come back to you. On that behalf could you maybe shed some light on this

@brentvollebregt
Copy link
Owner

auto-py-to-exe is just a UI layer on top of PyInstaller - it calls PyInstaller internally.

Directly from auto-py-to-exe's README.md

A .py to .exe converter using a simple graphical interface and PyInstaller in Python.

auto-py-to-exe offers the following on top of PyInstaller:

  • A UI to use PyInstaller
  • Basic validation on PyInstaller inputs (like paths and .ico file types)
  • Builds your script in a temporary directory so there is no need for manual cleanup
  • PyInstaller and Python version checks (where some versions can be incompatible)
  • Minor default differences where issues typically occur (at the moment we just change the recursion limit)
  • Some non-English language support

@gernophil
Copy link
Author

Ok, thanks for this :).
So, I guess this

* Builds your script in a temporary directory so there is no need for manual cleanup

is the reason, why I don't get the build folder and the .spec file? Wouldn't the spec file be good to have though?

@brentvollebregt
Copy link
Owner

Yep, that is the reason. If you want the .spec file, I would recommend using PyInstaller directly. auto-py-to-exe offers JSON configuration files as a substitute.

@gernophil
Copy link
Author

Ok, here's a little update on the codesign: If I run it directly in the command-line (via PyInstaller) It takes about 30 minutes to finish. The output of the terminal seems to be the same like in the auto-py-to-exe console. However, it is much faster. In the end signing was still not successful, but I think, that's a different issue. It seems like your auto-py-to-exe looses a lot of performance from PyInstaller (at least using macOS and codesign).

@brentvollebregt
Copy link
Owner

brentvollebregt commented Aug 11, 2023

That's interesting - I have faced speed issues when running auto-py-to-exe through vs code but when running directly in the terminal, I haven't seen any loss in speed.

When you ran auto-py-to-exe, did you have the project open in vs code and run it through the "Run and Debug" option or did you use the terminal?

@gernophil
Copy link
Author

gernophil commented Aug 12, 2023

How do you know I use VSCode ;)? I do actually, but I only use it as a code editor not to run anything. IIRC I tried both, but it did not change anything about the performance. If I run anything (at least Python based) I always start it directly from terminal.

EDIT: I made a little comparison on an older version (no codesigning, but the exact terminal command auto-py-to-exe gives:
auto-py-to-exe: 2:03 minutes
PyInstaller: 2:13 minutes
So, PyInstaller was even a bit slower (I know n = 1, but still). So looks like the codesigning in auto-py-to-exe really seems to be the issue here.

@brentvollebregt
Copy link
Owner

Hmm I see. When the codesigning was processing, were there logs being output? Potentially these could offer some insight.

@github-actions
Copy link

This issue is stale because it has been open for 60 days with no activity. Remove stale label or comment on this issue or it will be closed in 5 days.

@github-actions github-actions bot added the Stale label Sep 14, 2023
@github-actions
Copy link

Closing issue due to no activity in more than 60 days.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 19, 2023
@brentvollebregt brentvollebregt removed the bug Something isn't working label Jun 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants