-
Notifications
You must be signed in to change notification settings - Fork 52
/
Copy pathfabfile.py
46 lines (35 loc) · 921 Bytes
/
fabfile.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
from fabric.api import local, run, lcd, cd, env
from fabric.operations import get, put
from fabric.contrib.files import exists
import time
import re
from math import sqrt
from os import path
from os import listdir
try:
from _secret_paths import *
except ImportError:
print "Tip: Make a _secret_paths.py file to set up paths."
print "_secret_paths.py is in the .gitignore, so won't be commited."
HOSTS = []
GATEWAY = ''
LOCAL_REPO = path.dirname(__file__)
REMOTE_REPO = None
try:
from fabfiles.exp import *
except:
pass
env.use_ssh_config = True
def clean():
local('python setup.py clean --all')
def make(env='.env'):
local('source %s/bin/activate && python setup.py build_ext --inplace' % env)
def test():
local('py.test')
def qstat():
run("qstat -na | grep mhonn")
def deploy():
clean()
make()
with cd(str(REMOTE_REPO)):
run('git pull')