-
Notifications
You must be signed in to change notification settings - Fork 1
/
fabfile.py
46 lines (32 loc) · 1.04 KB
/
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
from fabric.api import *
from contextlib import contextmanager as _contextmanager
env.activate = '. ./env/bin/activate'
@_contextmanager
def virtualenv():
with prefix(env.activate):
yield
@task
def launch():
with virtualenv():
executable = local('find . -wholename "*pgadmin4/pgAdmin4.py"', capture=True)
local("python3 %s " %(executable))
@task
def runwsgihttp():
with virtualenv():
pg4 = local('find . -wholename "*pgadmin4"', capture=True)
local("uwsgi --http 127.0.0.1:5050 --chdir %(pg4)s --wsgi-file pgAdmin4.wsgi --master --threads 4" %{"pg4":pg4})
@task
def runwsgisocket():
with virtualenv():
pg4 = local('find . -wholename "*pgadmin4"', capture=True)
local("uwsgi --socket 127.0.0.1:5050 --chdir %(pg4)s --wsgi-file pgAdmin4.wsgi --master --threads 4" %{"pg4":pg4})
@task
def install_python2():
local("make install_python2")
with virtualenv():
local("make requirements_python2")
@task
def install_python3():
local("make install_python3")
with virtualenv():
local("make requirements_python3")