hey team. What would be a smart way to handle havi...
# general
f
hey team. What would be a smart way to handle having multiple
pex_binary
inside some artifact (say a Docker image or an archive)? If there are 5 scripts, each depending on
numpy
, each script == one entry point == one
pex_binary
, I get now 5
.pex
files, each containing the same
numpy
wheel binaries. I’ve looked carefully at the docs, and PEX can only have a single entry point. And say I don’t want to have 5 Docker images / 5 archives, each with a single PEX packaged.
c
Look at https://pypi.org/project/conscript/ for a way to defer which console script to invoke inside the pex.
Would be interested how that turns out, as I’ve not used that one myself before (picked it up as @enough-analyst-54434 suggested it some time back to another user…)
f
oooh very nice, thank you!
👍 1
e
Although concsript is probably better for an end user, you can do this directly with a PEX via
PEX_SCRIPT=foo ./my.pex ...
. See
pex --help-variables
for all the runtime environment variable knobs.
👀 1
👍 1