News for hackers. Stuff that matters.
Re:GeForce RTX 40 Series by forrestthewoods on Tuesday September 20, 2022 @04:20PM (#32917248)
It’s already been turned into single-click installers and Photoshop plugins.

Packaging Python is a dumpster fire of local environment complexity. But this is an extraordinarily solvable problem. I won’t call it solved today. But we have Proof of Life of solutions.

Re:GeForce RTX 40 Series by int_19h on Tuesday September 20, 2022 @05:40PM (#32918162)
If by "packaging" Python you mean vendoring it, it's very easy on any platform that I can think of.
Re:GeForce RTX 40 Series by forrestthewoods on Tuesday September 20, 2022 @09:29PM (#32919940)
I mean shipping people a .zip that has a simple executable that can be reliably run by end users zero external environment variable bullshit or dependencies. No Anaconda, Pip, or any of that non-sense. No fetching of dependencies either. Dead simple turn key usage.

And yeah it’s not super duper hard. It’s just not how Python projects are structured by default. Simple Diffusion isn’t setup that way. Some random person on the internet spent some time to package it up nicely and in exchange they hit #1 on HN. Possibly more than once!

https://xkcd.com/1987/

Re:GeForce RTX 40 Series by plonk on Friday September 23, 2022 @10:30AM (#32952427)
My easy method to make such a self-contained environment:

- download the Python embedded environment,

- modify `pythonXX.pth` to `import site`,

- install pip in the environment,

- install all dependencies with pip,

- install your code as an executable module (with a `__main__.py` file).

You can ship this as a ZIP file and simply run `./python.exe -m your_module arg1 arg2 arg3...`