Slight tweaks when making backup venv
This commit is contained in:
parent
a3339ac062
commit
cfba5425a1
|
@ -91,16 +91,15 @@ def deploy_backup_app(c, deploy, envname, mkvirtualenv=True, user='rattail',
|
||||||
# virtualenv
|
# virtualenv
|
||||||
envpath = '/srv/envs/{}'.format(envname)
|
envpath = '/srv/envs/{}'.format(envname)
|
||||||
if mkvirtualenv and not exists(c, envpath):
|
if mkvirtualenv and not exists(c, envpath):
|
||||||
|
mkdir(c, envpath, use_sudo=True, owner=user)
|
||||||
python.mkvirtualenv(c, envname, python=python_exe, runas_user=user)
|
python.mkvirtualenv(c, envname, python=python_exe, runas_user=user)
|
||||||
# TODO: this should not be necessary, right?
|
|
||||||
c.sudo('chown -R {}: {}'.format(user, envpath))
|
|
||||||
c.sudo("bash -c 'PIP_CONFIG_FILE={0}/pip.conf {0}/bin/pip install -U pip setuptools wheel'".format(envpath),
|
c.sudo("bash -c 'PIP_CONFIG_FILE={0}/pip.conf {0}/bin/pip install -U pip setuptools wheel'".format(envpath),
|
||||||
user=user)
|
user=user)
|
||||||
mkdir(c, os.path.join(envpath, 'src'), use_sudo=True, runas_user=user)
|
|
||||||
|
|
||||||
if install_rattail:
|
if install_rattail:
|
||||||
|
|
||||||
# rattail
|
# rattail
|
||||||
|
mkdir(c, os.path.join(envpath, 'src'), use_sudo=True, runas_user=user)
|
||||||
if not exists(c, os.path.join(envpath, 'src/rattail')):
|
if not exists(c, os.path.join(envpath, 'src/rattail')):
|
||||||
c.sudo('git clone https://kallithea.rattailproject.org/rattail-project/rattail {}/src/rattail'.format(envpath), user=user)
|
c.sudo('git clone https://kallithea.rattailproject.org/rattail-project/rattail {}/src/rattail'.format(envpath), user=user)
|
||||||
c.sudo("bash -c 'PIP_CONFIG_FILE={0}/pip.conf {0}/bin/pip install --editable {0}/src/rattail'".format(envpath),
|
c.sudo("bash -c 'PIP_CONFIG_FILE={0}/pip.conf {0}/bin/pip install --editable {0}/src/rattail'".format(envpath),
|
||||||
|
|
Loading…
Reference in a new issue