Skip to content

Instantly share code, notes, and snippets.

@medwig
Created November 8, 2019 14:22
Show Gist options
  • Save medwig/f5d45a218c80e5a5dff9ffa432949ff2 to your computer and use it in GitHub Desktop.
Save medwig/f5d45a218c80e5a5dff9ffa432949ff2 to your computer and use it in GitHub Desktop.
List all python packages in repo requirements
find -name 'requirements.txt' | xargs cat | sort | uniq > python_packages.txt && sed -i 's/[=<>].*$//g' python_packages.txt && uniq python_packages.txt && pip install -r python_packages.txt && cat python_packages.txt | xargs -d $'\n' sh -c 'for arg do pip show $arg | grep -v -e "^Location:" -e "^Requires:" -e "^Required-by:"; echo; done' > summary_python_packages.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment