Is it possible to generate a fully resolved `requi...
# general
r
Is it possible to generate a fully resolved
requirements.txt
that satisfies all deps for a target?
h
That is what a lockfile is
a requirements.txt is the input to generating a lockfile
r
I want the fully resolved requirements only for a single target. I want to avoid having multiple resolves if possible.
g
pex3 lock export-subset
does what you're looking for. This functionality is not exposed anywhere in Pants to my knowledge; but you can definitely plumb it together using a combination of
pants dependencies --transitive
and
shell_command
.
A very ghetto way could also be to just build the pex with dependencies and then dig out dep specs from the
PEX-INFO
file.
r
Thanks, that's very useful. I will give it a try and get back to you.