Skip to content

Instantly share code, notes, and snippets.

@johngag
Created December 3, 2012 01:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johngag/4192053 to your computer and use it in GitHub Desktop.
Save johngag/4192053 to your computer and use it in GitHub Desktop.
Fabric Python/Django requirements
def update_requirements():
requirements = os.path.join(env.home, 'requirements')
with prefix('source %s/bin/activate' % env.python_path):
with cd(requirements):
cmd=['pip install']
cmd += ['--requirement %s' % os.path.join(requirements, 'apps.txt')]
print(cmd)
run(' '.join(cmd))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment