Skip to content

Instantly share code, notes, and snippets.

@kotnik
Forked from joshkehn/fabfile.py
Created July 19, 2013 13:40
Show Gist options
  • Save kotnik/6039167 to your computer and use it in GitHub Desktop.
Save kotnik/6039167 to your computer and use it in GitHub Desktop.
Update all packages with Fabric calling pip.
from fabric.api import local
import pip
def freeze ():
local("pip freeze > requirements.txt")
local("git add requirements.txt")
local("git commit -v")
def upgrade ():
for dist in pip.get_installed_distributions():
local("pip install --upgrade {0}".format(dist.project_name))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment