From c00d6bae5ff3a964ecfde8cef873ae98dbb6dc5d Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 4 Dec 2023 21:45:43 +0100 Subject: [PATCH] Attempt to fix the venv mess.. --- scripts/install | 11 +++++------ scripts/upgrade | 14 ++++++-------- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/scripts/install b/scripts/install index 4f647d7..5f4b97d 100644 --- a/scripts/install +++ b/scripts/install @@ -33,14 +33,13 @@ ynh_add_nginx_config #================================================= # INSTALL PYTHON DEPENDENCIES #================================================= -#REMOVEME? ynh_script_progression --message="Installing Python dependencies..." +ynh_script_progression --message="Installing Python dependencies in venv..." pushd $install_dir - python3 -m venv $install_dir/venv - source $install_dir/venv/bin/activate - pip install --upgrade pip - pip install --upgrade pyyaml - pip install --pre pyload-ng[all] + python3 -m venv venv + venv/bin/pip install --upgrade pip + venv/bin/pip install --upgrade pyyaml + venv/bin/pip install --pre pyload-ng[all] popd #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 1d4a95a..c1ec1fa 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -28,16 +28,14 @@ ynh_add_nginx_config #================================================= # INSTALL PYTHON DEPENDENCIES #================================================= -ynh_script_progression --message="Installing Python dependencies..." - -ynh_secure_remove --file="$install_dir/venv" +ynh_script_progression --message="Installing Python dependencies in venv..." pushd $install_dir - python3 -m venv $install_dir/venv - source $install_dir/venv/bin/activate - pip install --upgrade pip - pip install --upgrade pyyaml - pip install --pre pyload-ng[all] + ynh_secure_remove venv + python3 -m venv venv + venv/bin/pip install --upgrade pip + venv/bin/pip install --upgrade pyyaml + venv/bin/pip install --pre pyload-ng[all] popd #=================================================