#!/usr/bin/env python
"""
 This file will get executed when you invoke `mendel` on the command line.
 We get the path to the `fabfile.py` in this repo,
 and then invoke fabric using that path. So if mendel is installed in something like

     /usr/local/lib/python/site-packages/mendel/

 running `mendel <args>` is the equivalent of invoking

      fab -f /usr/local/lib/python/site-packages/mendel/fabfile.py <args>

 The fabfile is empty, but since it exists in a module,
 fabric will look for tasks in the whole module,
 and discover the tasks generated in `mendel/__init__.py`.

 This is a pretty dirty hack, but it seems to be the
 cleanest way to ship fabric tasks as a library.
"""



from mendel import fabfile
import os
from fabric import main

fabfile_path = os.path.dirname(fabfile.__file__)

main.main([fabfile_path])
