View all files | ||||
shiv is a command line utility for building fully self-contained Python zipapps as outlined in PEP 441, but with all their dependencies included!
shiv's primary goal is making distributing Python applications fast & easy.
📗 Full documentation can be found here.
shiv has a few command line options of its own and accepts almost all options passable to pip install.
Creating an executable of flake8 with shiv:
-c flake8 specifies the console script that should be invoked when the executable runs, -o ~/bin/flake8 specifies the location of the generated executable file and flake8 is the dependency that should be installed from PyPI.
Creating an interactive executable with the boto library:
You can install shiv by simply downloading a release from https://github.com/linkedin/shiv/releases or via pip / pypi:
You can even create a pyz of shiv using shiv!
We'd love contributions! Getting bootstrapped to develop is easy:
Don't forget to run and write tests:
To build documentation when you changed something in docs:
Zipapps created with shiv are not guaranteed to be cross-compatible with other architectures. For example, a pyz file built on a Mac may only work on other Macs, likewise for RHEL, etc. This usually only applies to zipapps that have C extensions in their dependencies. If all your dependencies are pure python, then chances are the pyz will work on other platforms. Just something to be aware of.
Zipapps created with shiv will extract themselves into ~/.shiv, unless overridden via SHIV_ROOT. If you create many utilities with shiv, you may want to occasionally clean this directory.
Similar projects:
Logo by Juliette Carvalho