I'm curious: does anyone else use a `pex_binary` t...
# random
p
I'm curious: does anyone else use a
pex_binary
to generate a "self-extracting virtualenv archive"? I wrote an entry point (actually an "executable") for a pex that just makes the pex extract itself. I wonder if that is a common pattern or not. Here's where I'm adding the
pex_binary(executable=...)
: https://github.com/StackStorm/st2/pull/6307
c
I use PEX_TOOLS=1 venv tricks all over the place for Docker and various other deployments
p
Have you ever added a script to the pex that makes merely running it unpack it?
c
Hmm, oh like a script that re-execs with PEX_TOOLS so it acts like ye old 90s self extracting zip file? I have not but that sounds cool
p
The PR I linked to does that 😛
✋ 1
I did a few quirky things to remove the script from the venv after unpacking, but oh well. (I have the script in a
packaging/
directory, so it ends up in the venv merged with the
packaging
package. I didn't want that hanging around.)