mirror of
https://github.com/YunoHost-Apps/pyinventory_ynh.git
synced 2024-09-03 20:16:09 +02:00
Upgrade Python virtualenv in "restore"
This commit is contained in:
parent
ae1f3cdcf5
commit
955e7786b0
1 changed files with 17 additions and 0 deletions
|
@ -82,6 +82,23 @@ ynh_script_progression --message="Reinstalling dependencies..." --weight=40
|
|||
|
||||
ynh_exec_warn_less ynh_install_app_dependencies "$pkg_dependencies"
|
||||
|
||||
#=================================================
|
||||
# REINSTALL PYTHON VIRTUALENV
|
||||
# Maybe the backup contains a other Python version
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrade Python virtualenv..." --weight=10
|
||||
|
||||
python3 -m venv --upgrade "${final_path}/venv"
|
||||
|
||||
#run source in a 'sub shell'
|
||||
(
|
||||
set +o nounset
|
||||
source "${final_path}/venv/bin/activate"
|
||||
set -o nounset
|
||||
ynh_exec_as $app $final_path/venv/bin/pip install --upgrade pip
|
||||
ynh_exec_as $app $final_path/venv/bin/pip install -r "$final_path/requirements.txt"
|
||||
)
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE PostgreSQL DATABASE
|
||||
#=================================================
|
||||
|
|
Loading…
Reference in a new issue