Support exporting downloaded external tools
Is your feature request related to a problem? Please describe.
Pants supports various "tools", some of which are just a binary downloaded from the internet. For instance, pex, helm, terraform, makeself, shellcheck, potentially ruff (#21237), ...
It'd be convenient if there was some way to export such binaries from pants so that one can invoke them outside of pants, e.g. for local dev without pants overhead or even just for experimenting with the tool to understand how one needs to configure pants.
Describe the solution you'd like
pants export ... can somehow export downloaded tools. Ideas:
- treat them as a resolve with their options name, e.g.
pants export --resolve=pexorpants export --resolve=helm(may cause issues if someone has an existing resolve of the same name) - treat them as a resolve with some sort of namespacing, e.g.
pants export --resolve=__subsystem__/pex(less chance of an existing resolve with this name) - give them a new arg, e.g.
pants export --tool=pex - something else??
Describe alternatives you've considered
N/A
Additional context
See discussion on #21237
I think it makes sense to use a different arg:
- they would be implemented differently (not actually resolves)
- they would be used differently (invoked, instead of
source dist/.../activate) - we could put them all together into a folder like "dist/bin" so people could add it to their path
my bikeshed vote is for --bin, or maybe --tool