4 ms·
Well, you can't statically link bunch of python scripts. With this one you can do it easily (relatively).
by p2t2p 8y ago
Well, you can't statically link bunch of python scripts. With this one you can do it easily (relatively).
- progval 8y agoYes you can: eggs and wheels.
- filmor 8y agoStill needs Python itself.
- deleted 8y ago[deleted]
- pritambaral 8y agoFreezing python scripts+runtime to generate static executables has long been possible. Of course, all such methods are specific to python and have python-specific caveats. One could say static-containerisation is just a general form of the practice of freezing runtimes with scripts.
- fpoling 8y agoFor Python and other interpreters one does not need containers. LD_PRELOAD and similar hacks is sufficient to redirect reading of script files into reading from a file system embedded into the executable.
- Annatar 8y agoLD_PRELOAD in combination with LD_LIBRARY_PATH is meant to be used by a programmer debugging and testing his or her own shared object library, not for using software in production.
- fpoling 8y agoBy "similar hacks" I meant something like embedding a custom loader into a fully static binary that runs the interpreter and loads its libraries from the embedded filesystem while patching libc calls.
- TheDong 8y agoWhy would you bother with such difficult and fragile hacks when you could instead simply have the kernel itself remap those file-related calls with a mount namespace or chroot?
- megous 8y agoWhy would you invlove the kernel at all, since you have access to Python's code itself, and can just make your own version of python, that will source files from wherever you want. And your package will be protable to Windows, too.