1. I don't want to build 3rd party dependencies ev...
# general
s
2. I don't want to build 3rd party dependencies every time I make a change in our code. Is this the way to do it properly? I'm a little bit confused because the docker plugin may seem to be advertised like a thin wrapper around pex both in docker reference and in Benjy's post (I'm not trying to offend, just describing my experience)
h
You shouldn't have to, in that the 3rdparty requirements part of your pex should be retrieved from cache. Or is this in a CI environment where there is no cache?
s
Thanks for the fast reply! To be clear: I'm talking about building the pex. What I'm observing is that it takes 30-60 secs to build it (though there are 50+ dependencies - maybe it's expected?). I do have pip cache, and the deps are retrieved from it (they aren't getting downloaded over and over again). And I do have Pants cache, and from my perspective if I wait so much, then either the deps aren't retrieved from it, or it doesn't work as I expect it to. And the existence of the Joshua Cannon's method with splitting one
pex_binary
in two (deps only and sources only) suggests the second option (at least out of the box, with a single pex)
h
How big is the resulting pex? 30-60 secs is probably just the time it takes to zip up the file.
have you tried creating a venv pex instead of a zipapp?
s
No, I'll try it
b
@happy-kitchen-89482 did you mean a "packed" PEX? Venv is the execution mode, zipapp/packed is the layout
h
Ugh, I did, yes
packed+venv
👍 1