PyOxidizer Release for Packaging Python Projects into Standalone Executables

Introduced first release of the utility PyOxidizer, which allows packaging a Python project as a standalone executable file that includes the Python interpreter along with all necessary libraries and resources for its operation. Such files can run in environments without an installed Python toolkit or independent of having the required version of Python. PyOxidizer can also create statically linked executable files that are not tied to system libraries. The project code is written in Rust and is distributed is licensed under the MPL (Mozilla Public License) 2.0.

The project is based on a module of the same name for the Rust language, which allows embedding the Python interpreter into Rust programs for executing Python scripts within them. PyOxidizer has now gone beyond being a mere complement for Rust and is positioned as a tool accessible to a broader audience for creating and distributing standalone packages with Python. For those who do not need to distribute applications as executable files, PyOxidizer provides capabilities for generating libraries suitable for linking with any applications to embed the Python interpreter and the necessary set of extensions.

For end-users, delivering the project as a single executable file significantly simplifies installation and eliminates the hassle of dependency management, which is particularly relevant for complex Python projects, such as video editors. For application developers, PyOxidizer saves time on the delivery organization of the application, without the need to use various tools for creating packages for different operating systems.

The proposed builds also have a positive impact on performance — files generated by PyOxidizer launch faster than using the system Python due to the exclusion of importing and defining basic modules. In PyOxidizer, modules are imported from memory — all built-in modules are loaded into memory immediately and then used without referring to the disk. In tests, the application startup time when using PyOxidizer is reduced by about half.

Among the existing similar projects, we can highlight: PyInstaller (unpacks the file into a temporary directory and imports modules from it), py2exe (platform-bound to Windows and requires distributing several files), py2app (platform-bound to macOS), cx-freeze (requires separate packaging of dependencies), Shiv and PEX (creates a package in zip format and requires Python to be present on the system), Nuitka (compiles code rather than embedding the interpreter), pynsist (platform-bound to Windows), PyRun (proprietary development without explanations of its principles).

At the current stage of development, PyOxidizer has already implemented the main functionality for generating executable files for Windows, macOS, and Linux. Among the currently unavailable features, include the lack of a typical build environment, inability to generate packages in MSI, DMG, and deb/rpm formats, issues with packaging projects that include complex C extensions, the absence of commands for supporting delivery ('pyoxidizer add', 'pyoxidizer analyze', and 'pyoxidizer upgrade'), limited support for Terminfo and Readline, lack of support for releases other than Python 3.7, lack of resource compression support, and inability to cross-compile.

Source: opennet.ru

Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster