Hacker News new | past | comments | ask | show | jobs | submit login
Replacing pyinstaller with 100 lines of code (tushar.lol)
18 points by todsacerdoti 8 months ago | hide | past | favorite | 6 comments



The python project itself lets you download embeddable python, you don't need to get it from random sources. It works great, you can install all your pip packages, zip it backup and it just works.


> The python project itself lets you download embeddable python

Only for Windows: https://www.python.org/downloads/release/python-3123/


Nuitka does something like this too, but in my experience does not handle signals as well as PyInstaller.

Do you do extract, fork process, cleanup? Does it handle signals sent to the extract process as if they were sent to the actual program?


Yup, it's extract, fork process, cleanup. It's also fairly easy to extend the project to create installers and let the user choose a path to extract in, and I plan on doing that.

I also believe that sending a signal to the parent will be propagated down, but I haven't tested it.


Important to note that PyOxidizer, the tool that gets a special mention at the end of this blog post, is currently in a zombie state and not getting updates [1]. So alternatives in this space are extremely welcome!

[1] https://gregoryszorc.com/blog/2024/03/17/my-shifting-open-so...


There is also PyApp, which I think is really promising. The docs there are not that comprehensive yet and maybe a bit confusing, but the packaged programs usually work out of the box, unlike with pyinstaller.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: