Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any way to use shiv on read-only filesystem? #234

Open
wimglenn opened this issue Jul 27, 2023 · 2 comments
Open

Any way to use shiv on read-only filesystem? #234

wimglenn opened this issue Jul 27, 2023 · 2 comments

Comments

@wimglenn
Copy link

wimglenn commented Jul 27, 2023

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

@lorencarvalho
Copy link
Contributor

Hi @wimglenn,

A long time ago we attempted to support something that would allow this, but the use case is extremely narrow so ultimately we decided against continuing to support it. I believe that pex still supports this functionality though! https://pex.readthedocs.io/en/latest/buildingpex.html#zip-safe-not-zip-safe

@wimglenn
Copy link
Author

wimglenn commented Aug 8, 2023

Pex does similar, extracting to ~/.pex and I didn't find any way to avoid that either. Unfortunately that zip option doesn't actually do anything, I'm not sure why it's still documented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants