https://pantsbuild.org/ logo
#general
Title
# general
f

fresh-cat-90827

10/21/2021, 6:40 AM
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

curved-television-6568

10/21/2021, 7:29 AM
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

fresh-cat-90827

10/21/2021, 11:03 AM
oooh very nice, thank you!
👍 1
e

enough-analyst-54434

10/21/2021, 4:28 PM
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
4 Views