I’m happy to announce the release of PyEmpaq 0.5.
PyEmpaq is a simple but powerful Python packer to run any project with any virtualenv dependencies anywhwere.
With PyEmpaq you can convert any Python project into a single
.pyz file with all the project’s content packed inside.
That single file is everything that needs to be distributed. When the final user executes it, the original project will be expanded, its dependencies installed in a virtualenv, and then executed. Note that no special permissions or privileges are required, as everything happens in the user environment.
Both the packaging and the execution are fully multiplatorm. This means that you can pack a project in Linux, Windows, MacOS or whatever, and it will run ok in Linux, Windows, MacOS or whatever. The only requirement is Python to be already installed.
What’s new in this version?
Fixed a bug when using
entrypoint method of project execution when unpacking.
Upgraded Pydantic dependency version to 2.x.x for handling configuration
Minor improvements and new tests
For more details please check the documentation (which includes demos and examples). The project exists in Github.
I understand the differences to be:
Shiv and pex are “ahead of time” dense (larger size) archives that include application code and dependencies for a single target platform. Hermetic and deterministic installation.
PyEmpaq is a sparse (smaller size)archive. It only includes the application code and at first-run will create and install the rest into a virtualenv. A bit like using pipx to install an application, except without needing to teach the end-user about pipx. It’s self installing. Non-hermetic and non-deterministic installation, but may not matter in practice.
Ah that’s a good distinction, and was lost on me while glancing the docs.
Thanks @thejcannon and @barry for your interest. Please check this other post where I compare PyEmpaq with Pex and Shiv.
@groodt I really liked your succinct comparison, it’s very good! Thanks!!
I included a new section in the documentation with this information, so other people would find it easier.
Thanks again everybody!