diff --git a/scripts/upgrade b/scripts/upgrade index dc2d075..0df79e4 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -116,19 +116,29 @@ ynh_system_user_create --username=$app #================================================= ynh_script_progression --message="Upgrading Searx..." --weight=7 -# Clean venv if it still on python2 -if [ ! -e $final_path/bin/python2.* ] -then - ynh_secure_remove --file=$final_path/lib/ --regex='python[^/.]*' - ynh_secure_remove --file=$final_path/lib64/ --regex='python[^/.]*' - ynh_secure_remove --file=$final_path/share/python-wheels -fi -ynh_secure_remove --file=$final_path/lib/python3.7/site-packages/setuptools -ynh_secure_remove --file=$final_path/lib/python3.7/site-packages/ --regex='setuptools-[^/.]*' +# # Clean venv if it still on python2 +# if [ ! -e $final_path/bin/python3 ] +# then +# ynh_secure_remove --file=$final_path/lib/ --regex='python[^/.]*' +# ynh_secure_remove --file=$final_path/lib64/ --regex='python[^/.]*' +# ynh_secure_remove --file=$final_path/share/python-wheels +# fi +# ynh_secure_remove --file=$final_path/lib/python3.7/site-packages/setuptools +# ynh_secure_remove --file=$final_path/lib/python3.7/site-packages/ --regex='setuptools-[^/.]*' +# python3 -m venv --system-site-packages "$final_path" +# set +u; source $final_path/bin/activate; set -u +# pip3 install -U setuptools +# pip3 install --requirement $final_path/requirements-ynh.txt --upgrade + + + + python3 -m venv --system-site-packages "$final_path" set +u; source $final_path/bin/activate; set -u pip3 install -U setuptools -pip3 install --requirement $final_path/requirements-ynh.txt --upgrade +pip3 install --requirement $final_path/requirements-ynh.txt + + #================================================= # CONFIGURE SEARX