On Thu, 19 Nov 2020 at 15:03, Mathew Elman
Perhaps there could be something in the std-lib that allowed packaging into an executable but with some limitations, as a toy example: only supporting the std-lib dependencies. There is some precedence for minimal implementations existing in std-lib and third party libraries being more capable e.g. simple http server. So something like PyInstaller would be for when you need something more powerful, like support for third party libraries in the toy example limitation.
This could amount to adding certain extra features/behaviour to the zipapp module and a lightweight python_runner app (something like blender_runner for blender)
This would be a useful addition, but ultimately someone has to contribute the code. The recipe in the zipapp docs here https://docs.python.org/3/library/zipapp.html#making-a-windows-executable shows how you can make a standalone exe on Windows, but it's not exactly packaged up in a user friendly form, and I never really had the time to address that problem. And in any case, I don't know enough to do something similar for other operating systems (where there's no equivalent of the embedded distribution). Maybe someone could build a 3rd party implementation, and offer it for stdlib inclusion - but I'm not sure it's going to happen any other way. Paul