Skip to content

Instantly share code, notes, and snippets.

@mtomwing
Created January 17, 2014 17:36
Show Gist options
  • Save mtomwing/8477761 to your computer and use it in GitHub Desktop.
Save mtomwing/8477761 to your computer and use it in GitHub Desktop.
import os
from fabric.api import env, run, cd, put, sudo, hide
from fabric.contrib.project import rsync_project
base_path = os.path.dirname(__file__)
env.use_ssh_config = True
env.hosts = ['crunchbang']
def setup():
put(os.path.join(base_path, 'requirements.txt'), '/tmp/requirements.txt')
sudo('pip install -r /tmp/requirements.txt')
sudo('pip install flake8')
# For running tests better
sudo('pip install nose coverage')
def deploy():
with hide('output'):
rsync_project('~/', base_path)
def test():
with cd('~/freeseer'):
run('flake8 src')
with cd('~/freeseer/src'):
run('DISPLAY=:0.0 coverage run setup.py test 2>&1 | grep -vi "gtk-critical" | grep -v QSqlDatabasePrivate | grep .')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment