Last active
March 12, 2020 10:14
-
-
Save ibqn/93bee524d662f3a17c732ccd6628c4b3 to your computer and use it in GitHub Desktop.
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
pip freeze | grep -v "pkg-resources" | sort > frozed-requirements.txt | |
truncate -s 0 hashed-requirements.txt | |
while read p | |
do | |
echo "$p" | |
hashin "$p" --requirements-file=hashed-requirements.txt | |
done < frozed-requirements.txt | |
# https://pip.pypa.io/en/stable/user_guide/#repeatability | |
# https://pip.pypa.io/en/stable/reference/pip_install/#hash-checking-mode | |
# https://stackoverflow.com/questions/39577984/what-is-pkg-resources-0-0-0-in-output-of-pip-freeze-command | |
# https://github.com/peterbe/hashin | |
python3 -m venv './venv' | |
source './venv/bin/activate' | |
pip install --upgrade pip | |
pip install --upgrade --requirement './requirements.txt' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment