linkedin / linkedin/shiv

Any way to use shiv on read-only filesystem?

Open
#234 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.9k
Forks
114
PR merge metrics
No merged PRs in 30d

Description

By default it wants to unzip to `~/.shiv`. Is it possible to use shiv when there is no writable disk even available? i.e. working in-memory entirely.

A .pyz created from stdlib [zipapp](https://docs.python.org/3/library/zipapp.html#creating-standalone-applications-with-zipapp) will work this way, but they don't play nicely with C extensions (you're in trouble if any dependency used a .so file)

I'm hoping there is a way to abstract an in-memory filesystem in a way that will allow .so extension modules still to be imported.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with shiv's CLI behavior for extracting to ~/.shiv and trace how packaged dependencies, especially .so extension modules, are imported. Investigate whether an in-memory filesystem can support those imports on a read-only system. Done means a shiv-built zipapp runs without writable disk while retaining C-extension compatibility.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.