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

steep-match-53634

01/16/2023, 11:16 PM
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

happy-kitchen-89482

01/16/2023, 11:17 PM
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

steep-match-53634

01/16/2023, 11:44 PM
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

happy-kitchen-89482

01/17/2023, 12:40 PM
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

steep-match-53634

01/17/2023, 1:29 PM
No, I'll try it
b

bitter-ability-32190

01/17/2023, 1:49 PM
@happy-kitchen-89482 did you mean a "packed" PEX? Venv is the execution mode, zipapp/packed is the layout
h

happy-kitchen-89482

01/17/2023, 1:52 PM
Ugh, I did, yes
packed+venv
👍 1
6 Views