diff --git a/scripts/restore b/scripts/restore index 0ca081f..c49a52a 100644 --- a/scripts/restore +++ b/scripts/restore @@ -28,30 +28,10 @@ ynh_psql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name" #================================================= # PYTHON VIRTUALENV -# Maybe the backup contains a other Python version #================================================= -ynh_script_progression --message="Recreate Python virtualenv..." --weight=5 +ynh_script_progression --message="Update Python virtualenv..." --weight=5 -# Always recreate everything fresh with current python version -ynh_secure_remove "${install_dir}/venv" - -# Skip pip because of: https://github.com/YunoHost/issues/issues/1960 -python3 -m venv --without-pip "${install_dir}/venv" -chown -R "$app:" "$install_dir" - -#================================================= -# PIP INSTALLATION -#================================================= -ynh_script_progression --message="Install project via pip..." --weight=45 -#run source in a 'sub shell' -( - set +o nounset - source "${install_dir}/venv/bin/activate" - set -o nounset - ynh_exec_as $app $install_dir/venv/bin/python3 -m ensurepip - ynh_exec_as $app $install_dir/venv/bin/pip3 install --upgrade wheel pip setuptools - ynh_exec_as $app $install_dir/venv/bin/pip3 install --no-deps -r "$install_dir/requirements.txt" -) +python3 -m venv --upgrade --without-pip "$install_dir/venv" #================================================= # RESTORE SYSTEM CONFIGURATIONS