diff --git a/scripts/install b/scripts/install index 92c8131..ebddc89 100644 --- a/scripts/install +++ b/scripts/install @@ -100,7 +100,7 @@ ynh_script_progression --message="Installing Searx..." python3 -m venv --system-site-packages "$final_path" set +u; source $final_path/bin/activate; set -u -pip3 install -U pip setuptools +pip3 install -U setuptools pip3 install --requirement $final_path/requirements-ynh.txt #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 29de5de..11aadc9 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -124,10 +124,16 @@ ynh_system_user_create --username=$app ynh_script_progression --message="Upgrading Searx..." --weight=7 # Clean venv if it still on python2 -test -e $final_path/bin/python3 || ynh_secure_remove --file=$final_path +test -e $final_path/bin/python3 || ( + ynh_secure_remove --file=$final_path/lib/python* + ynh_secure_remove --file=$final_path/lib64/python* + ynh_secure_remove --file=$final_path/share/python-wheels +) +ynh_secure_remove $final_path/lib/python2.7/site-packages/setuptools +ynh_secure_remove $final_path/lib/python2.7/site-packages/setuptools-* python3 -m venv --system-site-packages "$final_path" set +u; source $final_path/bin/activate; set -u -pip3 install -U pip setuptools +pip3 install -U setuptools pip3 install --requirement $final_path/requirements-ynh.txt --upgrade #=================================================