News for hackers. Stuff that matters.
Re:Python Wheels Crosses 90% by rtpg on Sunday June 07, 2020 @10:52PM (#23453140)
PyOxidizer might be of interest to you.
Re:Python Wheels Crosses 90% by shoo on Sunday June 07, 2020 @11:23PM (#23453296)
Around a decade ago I worked for a place that packaged and shipped python applications to windows desktops using a similar bundling tool, py2exe. It worked pretty fine. Pretty much just unzips into a directory: there's your self contained python app hiding inside an exe and some associated data files/dlls in the directory.

We still used wheel archives etc for managing some python dependencies during our dev and build process, but it was never a complete solution: some python packages depend upon non python shared libraries so you need to install them using an operating system level package manager. Then when shipping the software to users you cannot assume the user has a working version of python, or even if they do you don't want to increase your support burden by having your application running inside some arbitrary python environment.

Re:Python Wheels Crosses 90% by pansa2 on Sunday June 07, 2020 @11:52PM (#23453415)
Thanks, I hadn’t heard of PyOxidizer before. Looks like a significant improvement over tools like PyInstaller and Shiv, which produce self-extracting executables that are slow and/or leave files hanging around after running.
Re:Python Wheels Crosses 90% by BiteCode_dev on Monday June 08, 2020 @05:46AM (#23455127)
There are trade off to anything.

E.G:

- shiv leave files hanging around, but you can address those files directly. With PyOxidize, you will need to use https://pyoxidizer.readthedocs.io/en/stable/config_api.html#... a way to read a non Python files. Because most projects don't know this and just use open(), they won't work out of the box and you may need to monkey patch open().

- pyoxidizer requires a compiler, which is easy on linux, but a higher requirement on windows. Compared to shiv, which is just a pip install away.

There is no perfect solution yet, because you have really often many things to balance: bringing in the python vm or not, allow compiled extensions or not, provide support for open() or not, etc.

Re:Python Wheels Crosses 90% by haberman on Sunday June 07, 2020 @10:55PM (#23453158)
Yes, that looks like exactly what I had in mind. Thanks for the reference.