-
You could do it this way if you want to use awk
pip download $PACKAGE -d /tmp --no-binary :all: | awk '/Collecting/ && $2 !~ /'${PACKAGE}'([~=!<>]|$)/ { print $2 }'
But the snippet was very helpful though - thanks for sharing.
Edited by Bill Ryder -
Thanks! But this doesn't clean up after itself and it doesn't check for dependencies of the dependencies. Try using https://pypi.org/project/johnnydep/
Edited by Andrew Lamarra -
Oh interesting.
I've switched to using this now
https://pypi.org/project/pipgrip/
I particularly like the json output since I'm a big fan of https://stedolan.github.io/jq/
Please register or sign in to comment