3 ms·
If you are wondering what PyOxidizer is then here is a good explanation: https://pyoxidizer.readthedocs.io/en/v0.8.0/overview.html https://pyoxidizer.readthedo
by nickcw 6y ago
If you are wondering what PyOxidizer is then here is a good explanation:
https://pyoxidizer.readthedocs.io/en/v0.8.0/overview.html https://pyoxidizer.readthedocs.io/en/v0.8.0/overview.html
From that page:
From a very high level, PyOxidizer is a tool for packaging and distributing Python applications. The over-arching goal of PyOxidizer is to make this (often complex) problem space simple so application maintainers can focus on building quality applications instead of toiling with build systems and packaging tools.
On a lower, more technical level, PyOxidizer has a command line tool - pyoxidizer - that is capable of building binaries (executables or libraries) that embed a fully-functional Python interpreter plus Python extensions and modules in a single binary. Binaries produced with PyOxidizer are highly portable and can work on nearly every system without any special requirements like containers, FUSE filesystems, or even temporary directory access. On Linux, PyOxidizer can produce executables that are fully statically linked and don’t even support dynamic loading.
The Oxidizer part of the name comes from Rust: binaries built with PyOxidizer are compiled from Rust and Rust code is responsible for managing the embedded Python interpreter and all its operations. But the existence of Rust should be invisible to many users, much like the fact that CPython (the official Python distribution available from www.python.org) is implemented in C. Rust is simply a tool to achieve an end goal (albeit a rather effective and powerful tool).
- formerly_proven 6y agoSo does this use a custom build of CPython linked against a different libc that's part of the package? That has been IME one of the major issues with distributing binary packages of Python apps on Linux, because code built using glibc tends to use recent versions of common symbols, so in practice you can't run them on a system with a glibc older than the build system's glibc, meaning you have to build on some ancient Linux where everything is a pain. Edit: Sounds like it: > PyOxidizer uses custom Python distributions that are built in such a way that they are highly portable across machines.
- nickcw 6y agoThe page states that a static build is possible so you'll get a binary you can distribute to any machine at that point.
- quietbritishjim 6y agoWithout any more clarification that doesn't quite answer the question because libc is such a special beast. Typically (but maybe not always) "static build" on Linux really means "all libraries are statically linked except libc which is dynamically linked". To make something very portable across Linux distributions, rather than statically linking libc you would dynamically link against an old version of it, as newer versions are always backwards compatible with older versions.
- oefrha 6y ago> meaning you have to build on some ancient Linux where everything is a pain. Well, PyPA provides Docker images for manylinux﹡[1] and manylinux2014 isn’t that ancient, I found it mostly tolerable in my experience of building wheels for various computational packages of my own (depending on gmp, etc.). In fact even manylinux1 and manylinux2010 have been okay for me, but that of course depends on what libraries you need. The future of manylinux is defined in PEP 600[2], though I’m not sure about what has happened implementation-wise regarding the new scheme. [1] https://github.com/pypa/manylinux https://github.com/pypa/manylinux [2] https://www.python.org/dev/peps/pep-0600/ https://www.python.org/dev/peps/pep-0600/
- nethunters 6y ago> Specifying --target x86_64-unknown-linux-musl will cause PyOxidizer to use a Python distribution built against musl libc as well as tell Rust to target musl on Linux. [1] https://pyoxidizer.readthedocs.io/en/stable/packaging_static_linking.html https://pyoxidizer.readthedocs.io/en/stable/packaging_static...
- deleted 6y ago[deleted]