Last active
July 20, 2017 08:46
-
-
Save brennv/59fdfa503a9f621bcabaea5cbabd472d to your computer and use it in GitHub Desktop.
pif: A simple diff wrapper for pip
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Diff pip freeze after pip install or uninstall | |
# Example usage: pif install foo | |
pif() { | |
if [[ $@ == *'install'* ]]; then | |
r1=$(mktemp) && pip freeze > r1 | |
pip "$@" | |
r2=$(mktemp) && pip freeze > r2 | |
echo ' Pip freeze diff:' | |
diff r1 r2 | |
rm -f r1 r2 | |
else | |
pip "$@" | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For maintaining
requirements.txt
I recommend pipreqs.