Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

pypi license supported

snake

shiv-userdirs

Project Status: Archived

This fork was created to work around a limitation in the original linkedin/shiv: when SHIV_ROOT pointed to a shared directory, shiv would extract into that directory without any per-user isolation. This caused permission problems in multi-user environments — especially for service accounts without a writable home directory. The workaround creates a user-owned subdirectory (<SHIV_ROOT>/<uid>/, chmod 700) so that each user has an isolated extraction path.

The projects that relied on this fork have since been migrated to AppImage deployment using ssh-mitm/appimage (PyPI), so this package is no longer maintained. It is published to PyPI for archival purposes only.

If you need continued development or have a use case for this approach, feel free to reach out to Manfred Kaiser or open an issue on GitHub.

Python SHIV-version, which creates user-owned directories if SHIV_ROOT is used.

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.

sys requirements

  • python3.6+
  • linux/osx/windows

quickstart

shiv has a few command line options of its own and accepts almost all options passable to pip install.

simple cli example

Creating an executable of flake8 with shiv:

$ shiv -c flake8 -o ~/bin/flake8 flake8
$ ~/bin/flake8 --version
3.7.8 (mccabe: 0.6.1, pycodestyle: 2.5.0, pyflakes: 2.1.1) CPython 3.7.4 on Darwin

-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:

$ shiv -o boto.pyz boto
Collecting boto
Installing collected packages: boto
Successfully installed boto-2.49.0
$ ./boto.pyz
Python 3.7.4 (v3.7.4:e09359112e, Jul  8 2019, 14:54:52)
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> import boto
>>> boto.__version__
'2.49.0'

installing

pip install shiv-userdirs

You can even create a pyz of shiv using shiv!

python3 -m venv .
source bin/activate
pip install shiv-userdirs
shiv -c shiv -o shiv shiv-userdirs

gotchas

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.


acknowledgements

Similar projects:

Logo by Juliette Carvalho

Metadata

Release files for shiv-userdirs 1.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for shiv-userdirs 1.0.5
File Size Uploaded
shiv_userdirs-1.0.5.tar.gz 32.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for shiv-userdirs 1.0.5
File Interpreter ABI Platform
shiv_userdirs-1.0.5-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 53.0 kB

Release files / shiv_userdirs-1.0.5.tar.gz

Download URL shiv_userdirs-1.0.5.tar.gz
Size 32.4 kB
Tags Source
SHA-256 checksum
How to use checksums
6f94d39c40a13fada214bdf84668a9e3037da9d38d6be7f5d3ee00b1a88c23e3
BLAKE2b-256 checksum
How to use checksums
4e3c4739ea9035b6c16b402caf13133539b4e7b99829ed8d92cd3635bdbd8197
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 21, 2026.

Transparency log

Release files / shiv_userdirs-1.0.5-py2.py3-none-any.whl

Download URL shiv_userdirs-1.0.5-py2.py3-none-any.whl
Size 20.6 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
d78d264b1aa6ef9649967cc8ab22fbd2ca530d27ef18458dd19c2e53c6b635a8
BLAKE2b-256 checksum
How to use checksums
c73339e7488be31c233e1e8575193a3841b6dcf702d23e0882ddbb960625f208
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 21, 2026.

Transparency log
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page