import os import sys from invoke import task @task def sync_env(c): """Update the local virtualenv with pip-sync""" if not os.environ.get('VIRTUAL_ENV'): print("You are operating outside of a virtualenv. Skipping sync...") sys.exit(1) print("Updating your virtualenv dependencies!") c.run("pip-sync ./requirements.txt ./dev_requirements.txt")