In Fabric1 there was the ability to put a bunch of settings in the fabfile.py and import the actually tasks from another package. This is wanted as I'm using these tasks for a multiple projects.
Like so:
from fabric.api import env
env.django_dir = '/home/someuser/django_app'
env.git_repo = 'some url'
Then any fabric code could access the variables like so:
from fabric.api import env
def clone():
with cd('$HOME'):
run('git clone {repo} {django_dir}'.format(
repo=env.git_repo, django_dir=env.django_dir))
It seems however that from fabric2 there is no longer such a thing as this env
.
How can I get my tasks from another package to use the configuration settings in fabfile.py?