broad-processor-9240003/31/2023, 7:22 AM
argument to install the reqs directly into that directory, without the usual venv structure. This is very handy for building lambda functions/layers, because doing that generally gives a directory that works as the root of a function/layer (e.g. it's what AWS's CDK does in their lambda packaging construct). Is there way to achieve something similar within when given a PEX file (or via the PEX CLI)? I'm going to experiment with
and using the contents of the
PEX_TOOLS=1 file.pex venv $(mktemp)
directory alone, dropping the rest of the venv structure, but that doesn't seem particularly right, on the surface...
average-breakfast-9154503/31/2023, 8:36 AM
directory. https://github.com/bobthemighty/pants-lambda-layer/tree/master/pants-plugins I've not used it in anger yet, but it's worked in prototypes, and I'll probably be running it for real today.
enough-analyst-5443403/31/2023, 8:44 AM
subcommands. Now they don't help here, they only deal with 3rd party and the venv shenanigans deals with 1st and 3rd party. However, knowing those subcommands exist on top of
pretty much makes the case that PEX tools should just support this case you both have directly.
broad-processor-9240004/02/2023, 1:01 AM
enough-analyst-5443404/02/2023, 1:29 AM
broad-processor-9240004/02/2023, 2:27 AM
), and cannot seem to use the tools to extract it when running them on macOS, or arm64 linux. https://gist.github.com/huonw/adbd1d685f595d10780e5f878a5245cd spells out what I tried. (To be clear, I'm willing to try the new environments to run the PEX within an appropriate image, so a feature here would be an optimisation.)
enough-analyst-5443404/02/2023, 2:38 AM
broad-processor-9240004/02/2023, 2:45 AM
enough-analyst-5443404/02/2023, 2:49 AM
broad-processor-9240004/02/2023, 2:51 AM
enough-analyst-5443404/02/2023, 4:47 AM
internally, which is a standard input to both a Pip resolve and a boot resolve from a PEX. The default target is the current interpreter, you don't want that, you want the target(s) specified by those args, in particular --complete-platform.