Python SHIV-version, which creates user owned directires if SHIV_ROOT is used.
This project has been archived.
The maintainers of this project have marked this project as archived. No new releases are expected.
Project description
shiv-userdirs
Project Status: Archived
This fork was created to work around a limitation in the original linkedin/shiv: when
SHIV_ROOTpointed 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file shiv_userdirs-1.0.5.tar.gz.
File metadata
- Download URL: shiv_userdirs-1.0.5.tar.gz
- Upload date:
- Size: 32.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f94d39c40a13fada214bdf84668a9e3037da9d38d6be7f5d3ee00b1a88c23e3
|
|
| MD5 |
c6e9a71cd8d5da90db396fdb1df70836
|
|
| BLAKE2b-256 |
4e3c4739ea9035b6c16b402caf13133539b4e7b99829ed8d92cd3635bdbd8197
|
Provenance
The following attestation bundles were made for shiv_userdirs-1.0.5.tar.gz:
Publisher:
publish.yml on manfred-kaiser/shiv-userdirs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
shiv_userdirs-1.0.5.tar.gz -
Subject digest:
6f94d39c40a13fada214bdf84668a9e3037da9d38d6be7f5d3ee00b1a88c23e3 - Sigstore transparency entry: 1894757051
- Sigstore integration time:
-
Permalink:
manfred-kaiser/shiv-userdirs@adb5cd81d25e01bc3918382961af720842fd677f -
Branch / Tag:
refs/tags/1.0.5 - Owner: https://github.com/manfred-kaiser
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@adb5cd81d25e01bc3918382961af720842fd677f -
Trigger Event:
release
-
Statement type:
File details
Details for the file shiv_userdirs-1.0.5-py2.py3-none-any.whl.
File metadata
- Download URL: shiv_userdirs-1.0.5-py2.py3-none-any.whl
- Upload date:
- Size: 20.6 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d78d264b1aa6ef9649967cc8ab22fbd2ca530d27ef18458dd19c2e53c6b635a8
|
|
| MD5 |
7e4512c6f87d4d4f10eaaf344641104d
|
|
| BLAKE2b-256 |
c73339e7488be31c233e1e8575193a3841b6dcf702d23e0882ddbb960625f208
|
Provenance
The following attestation bundles were made for shiv_userdirs-1.0.5-py2.py3-none-any.whl:
Publisher:
publish.yml on manfred-kaiser/shiv-userdirs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
shiv_userdirs-1.0.5-py2.py3-none-any.whl -
Subject digest:
d78d264b1aa6ef9649967cc8ab22fbd2ca530d27ef18458dd19c2e53c6b635a8 - Sigstore transparency entry: 1894757196
- Sigstore integration time:
-
Permalink:
manfred-kaiser/shiv-userdirs@adb5cd81d25e01bc3918382961af720842fd677f -
Branch / Tag:
refs/tags/1.0.5 - Owner: https://github.com/manfred-kaiser
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@adb5cd81d25e01bc3918382961af720842fd677f -
Trigger Event:
release
-
Statement type: