Skip to content

Instantly share code, notes, and snippets.

@theoden-dd
Created September 4, 2012 22:50
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 theoden-dd/3627640 to your computer and use it in GitHub Desktop.
Save theoden-dd/3627640 to your computer and use it in GitHub Desktop.
changes in interaction with pip.py
# somewhere in WebProject
@task_mehtod
def install_r(self, what=None, options='', restart=True):
"""
Installs pip requirements listed in ``<PIP_REQUIREMENTS_PATH>/<file>.txt`` file
and reloads all apps of the project, if specified.
"""
pip.install_r(what, options)
if restart:
for app in self.apps:
app.restart()
@task_method
def update_r(self, what=None, options='', restart=True):
"""
Updates pip requirements listed in ``<PIP_REQUIREMENTS_PATH>/<file>.txt`` file
and reloads all apps of the project, if specified.
"""
pip.update_r(what, options)
if restart:
for app in self.apps:
app.restart()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment