News for hackers. Stuff that matters.
Re:Nuitka: a Python compiler written in Python by foepys on Thursday June 17, 2021 @06:57AM (#27538249)
If you are looking for something lighter: CPython can execute ZIPs with a Python program inside.

You can also prepend the python shebang before the ZIP and mark it as executable in the filesystem. youtube-dl gets distributed like that.

Re:Nuitka: a Python compiler written in Python by randlet on Thursday June 17, 2021 @07:10AM (#27538333)
The problem with this method is that the user still needs to have Python on their system. Pyinstaller (Py2exe, cx_Freeze) bundle the python interpreter along with your app.
Re:Nuitka: a Python compiler written in Python by londt8 on Thursday June 17, 2021 @09:16AM (#27539242)
I think its typical that only one python runtime is installed in the system. What is the use case for bundling the runtime with the app?
Re:Nuitka: a Python compiler written in Python by azeirah on Thursday June 17, 2021 @10:56AM (#27540240)
I'm one of the rare idiots who wrote a consumer-faced python+Qt program. I need to ship the right dependencies along with the right version of python to my customers.

Using Pyinstaller it works out in the end, but after everything, it would have been better to use a language meant for user-facing applications.

Re:Nuitka: a Python compiler written in Python by scarygliders on Thursday June 17, 2021 @09:43AM (#27539468)
I package Captain's Log [0] with PyInstaller.

I need to, because otherwise I wouldn't be able to package it for Windows users.

The app is also closed source.

I cannot easily package the application for Linux users, because of so many different flavours of Linux, so many different combinations of Python and Qt versions.

Which is why I've given up on a pure Linux version and I'm in the middle of adapting it to work under WINE alongside Elite: Dangerous also running under WINE, instead.

[0] https://captainslog.scarygliders.net/captains-log-2/

Re:Nuitka: a Python compiler written in Python by curryst on Thursday June 17, 2021 @10:46AM (#27540141)
Many systems still have both Python 2 and Python 3 installed. Also, in the standard case, the version of Python is controlled by the user, not by your app. Bundling it with the app lets you make sure that it's running Python 3.8, for example, so that you can use Python 3.8 features without having to add a bunch of compatibility shims in case the user is running an older version.
Re:Nuitka: a Python compiler written in Python by nsomaru on Thursday June 17, 2021 @09:50AM (#27539537)
Distribute my cli app + gooey as a stand-alone binary for windows users
Re:Nuitka: a Python compiler written in Python by dagw on Thursday June 17, 2021 @12:39PM (#27541562)
Perhaps on a server, but on my workstation I probably have 6 or 7 pythons installed.

edit: including virtualenvs and conda environments have 41 python.exe files on my workstation right now.

Re:Nuitka: a Python compiler written in Python by pyuser583 on Thursday June 17, 2021 @11:49PM (#27547179)
No there’s often tons of them. I’ve personally seen hundreds.
Re:Nuitka: a Python compiler written in Python by randlet on Thursday June 17, 2021 @12:51PM (#27541693)
Roughly 0% of Windows users have Python installed.
Re:Nuitka: a Python compiler written in Python by goodpoint on Thursday June 17, 2021 @09:14AM (#27539224)
Even better: use OS packages. They allow listing what is installed on a host, remove it cleanly, do atomic updates, ship manuals, configuration files, systemd unit files, implement sandboxing and so on.