shiv
shiv copied to clipboard
Any way to use shiv on read-only filesystem?
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.
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
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.