https://pantsbuild.org/ logo
r

rapid-crayon-8232

12/23/2019, 1:01 PM
hey guys, is there a Goal/Target in pants to only install all dependencies of a particular path? My problem is that I want to use pants in docker, and I don't want to have to rebuild the dependency graph each time I want to generate a binary, so my idea is that I'll install all dependencies in a layer, and then binary goal will rebuild only the parts that changed each time
h

happy-kitchen-89482

12/23/2019, 5:21 PM
What language is this for?
r

rapid-crayon-8232

12/23/2019, 5:22 PM
for python sorry
h

happy-kitchen-89482

12/23/2019, 5:24 PM
And, to clarify, are you talking about 3rdparty dependencies vs. internal code? It's common that 3rdparty dependencies change rarely but internal code changes all the time.
r

rapid-crayon-8232

12/23/2019, 5:24 PM
for more context, when running a goal (test/binary) pants caches dependencies and sources in
pants.d
to use them for further invocations, is there a goal that will run to just generate the cache for specific
target
I'm talking a goal whose sole purpose is downloading and caching 3rdparty dependencies for example
like
./pants install src/3rdparty/::
or
./pants install src/python/somePackage/::
h

happy-kitchen-89482

12/23/2019, 6:11 PM
So just create the pexes but don't do anything with them
r

rapid-crayon-8232

12/23/2019, 6:14 PM
is there a goal for just creating the pexes ?
h

happy-kitchen-89482

12/23/2019, 9:17 PM
Oh sorry I just meant to reiterate what you were referring to
There should have been a question mark at the end...
"So just create the pexes but don't do anything with them?"
Let me get back to you on that
r

rapid-crayon-8232

12/23/2019, 11:28 PM
ok thx 🙂
h

happy-kitchen-89482

12/29/2019, 4:29 PM
Sorry, have been traveling but haven't forgotten this.
TBH my brain is entirely in the v2 engine right now, where this sort of thing happens automatically.
What version of Pants are you on? I'm wondering if you could switch to the v2 python pipeline, which is very near completion.
r

rapid-crayon-8232

12/30/2019, 11:43 PM
yep happy to switch anytime, and I'm on one of the latest versions
1.24.0.dev2
(the one with pex v2)
any news @happy-kitchen-89482? thx 🙏
h

happy-kitchen-89482

01/13/2020, 6:40 PM
I think you should be able to switch! the v2 python pipeline is basically feature complete. Is your underlying code Python 2 or Python 3?
r

rapid-crayon-8232

01/13/2020, 6:50 PM
python3.7 😁
i'm using v1.24.0.dev0 as it is the only version with pex 2.0.0, I'm not sure wether there is some problem with it as it is not available in later versions
h

happy-kitchen-89482

01/13/2020, 7:38 PM
Yes, there was some issue with it, we're working to restore it in the next release
r

rapid-crayon-8232

01/14/2020, 4:55 PM
apparently just using
./pants pyprep packages/::
directly does what I want already haha
h

happy-kitchen-89482

01/15/2020, 6:43 PM
oh great!
4 Views