hey all is there a way to list the transitive depe...
# general
w
hey all is there a way to list the transitive dependencies of particular 3rdparty dependency in the same way that poetry does it like so
Copy code
❯ poetry show requests --tree
requests 2.31.0 Python HTTP for Humans.
├── certifi >=2017.4.17
├── charset-normalizer >=2,<4
├── idna >=2.5,<4
└── urllib3 >=1.21.1,<3
or maven dependency:tree?
h
There is not, today. First, pants's dependency modeling doesn't look inside lockfiles, so Pants's view of the world ends at the direct 3rdparty deps. It delegates everything that happens from there to Pex, via the lockfile.
Second, even for first-party deps, Pants doesn't do any tree graphing
There are open tickets for these
w
gotcha, thanks @happy-kitchen-89482, can pex show a list? I am mostly intersted in the info
h
Well, the info is in the lockfile, and you can use
pex lock export --format=pip lockfile
to get a requirements list from it
with the annoying caveat that you first have to strip off the front matter that Pants adds to the json
w
right, I see, it also seems like pex supports dot output, so in theory I could write a small pants extension that execute the pex command on the resolve/lock file, Am I thinking about this right?
h
Yep, you could do it that way
👍 1