Last active
August 29, 2015 14:05
-
-
Save mozz100/7a22e54e17a3a2d4ee66 to your computer and use it in GitHub Desktop.
Patch updates for pinned python packages
This file contains hidden or 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
# Use sed to replace '==x.y' with '<x.y.999' | |
# and save results to a file | |
sed -r -e "s/==([0-9]+\.[0-9]+)(\..+)?/<\1.999/" requirements.txt > /tmp/requirements2.txt | |
# It works by transforming the file like this: | |
# Django==1.4.8 >> Django<1.4.999 | |
# Jinja2==2.5 >> Jinja2<2.5.999 | |
# M2Crypto==0.19.1 >> M2Crypto<0.19.999 | |
# MySQL-python==1.2.5 >> MySQL-python<1.2.999 | |
# Pillow==2.5.1 >> Pillow<2.5.999 | |
# Use pip with --upgrade and feed in the results | |
pip install --upgrade -r /tmp/requirements2.txt | |
# Compare updated environment with existing requirements.txt | |
pip freeze | diff - requirements.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment