virtualenv root

pull/1/head
Rui Carmo 2016-03-27 13:20:44 +01:00
rodzic fed5fa175d
commit ef41ddc3fd
1 zmienionych plików z 3 dodań i 2 usunięć

Wyświetl plik

@ -9,6 +9,7 @@ from subprocess import call
PIKU_ROOT = os.environ.get('PIKU_ROOT', join(os.environ['HOME'],'.piku'))
APP_ROOT = abspath(join(PIKU_ROOT, "apps"))
ENV_ROOT = abspath(join(PIKU_ROOT, "envs"))
GIT_ROOT = abspath(join(PIKU_ROOT, "repos"))
UWSGI_ENABLED = abspath(join(PIKU_ROOT, "uwsgi-enabled"))
UWSGI_AVAILABLE = abspath(join(PIKU_ROOT, "uwsgi-available"))
@ -60,7 +61,7 @@ def do_deploy(app):
@group()
def piku():
"""Initialize paths"""
for p in [APP_ROOT, GIT_ROOT, UWSGI_AVAILABLE, UWSGI_ENABLED, LOG_ROOT]:
for p in [APP_ROOT, GIT_ROOT, ENV_ROOT, UWSGI_AVAILABLE, UWSGI_ENABLED, LOG_ROOT]:
if not exists(p):
os.makedirs(p)
pass
@ -145,7 +146,7 @@ def enable_app(app):
def destroy_app(app):
"""Destroy an application"""
app = sanitize_app_name(app)
for p in [join(x, app) for x in [APP_ROOT, GIT_ROOT, LOG_ROOT]]:
for p in [join(x, app) for x in [APP_ROOT, GIT_ROOT, ENV_ROOT, LOG_ROOT]]:
if exists(p):
echo("Removing folder '%s'" % p, fg='yellow')
shutil.rmtree(p)