Hello @sinoroc !
Take my following assertions regarding those two tools with a grain of salt because I’ve never really used them, but here’s my comparison.
Shiv would create a fully self-contained Python zip app with all their dependencies included, which means that it ships not only your project but also the dependencies! this makes the resulting .pyz NOT multiplatform (unless your project and ALL your dependencies are pure Python…).
On the other hand, PyEmpaq will create the virtualenv and install the needed dependencies the first time the .pyz
is executed in the destination machine. This allows for example to pack a fully graphical desktop program that works with Qt, like this example.
A side detail of this is that we normally include dependencies in our programs, and those dependencies have sub-dependencies, etc. How sure are you that the whole set of dependencies and sub dependencies have a license that allows you to distribute them? Shiv will distribute them, PyEmpaq will not!
Pex looks like it also includes the dependencies in the resulting file, but goes an extra mile pointing to the Python that was used to build the thing. So for example I built a .pex with Py3.10 and moved the file to a machine that has only 3.9, and it didn’t work, and both were Ubuntus! No multiplatform at all, no even mention to pack in Linux (once!) and run in Windows (or everywhere), as PyEmpaq allows to do.
Everything said, it looks like both tools are used to “handle dependencies” (like fades), while PyEmpaq is to pack and distribute your project (and it will handle the dependencies because are needed by your project, but it’s not the focus).
Please correct me if I’m wrong with the analysis I did for those tools, and let me know if you have any questions!
Regards,