1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/searxng_ynh.git synced 2024-09-03 20:26:00 +02:00

FIx upgrade script

This commit is contained in:
mh4ckt3mh4ckt1c4s 2023-03-04 17:09:14 +01:00
parent dd0a74fe1c
commit 7edcfe909d

View file

@ -140,21 +140,13 @@ ynh_add_nginx_config "path_no_root"
#=================================================
ynh_script_progression --message="Upgrading SearXNG..." --weight=2
# Clean venv if it still on python2
if [ ! -e $final_path/bin/python3 ]
then
ynh_regex_secure_remove --file=$final_path/lib/ --regex='python[^/.]*'
ynh_regex_secure_remove --file=$final_path/lib64/ --regex='python[^/.]*'
ynh_regex_secure_remove --file=$final_path/share/python-wheels
fi
ynh_regex_secure_remove --file=$final_path/lib/python3/site-packages/setuptools
ynh_regex_secure_remove --file=$final_path/lib/python3/site-packages/ --regex='setuptools-[^/.]*'
ynh_secure_remove --file="$final_path/venv"
python3 -m venv --system-site-packages "$final_path"
python3 -m venv --system-site-packages "$final_path/venv"
set +u; source $final_path/bin/activate; set -u
pip3 install -U setuptools
pip3 install --requirement $final_path/requirements-ynh.txt --upgrade
set +u; source $final_path/venv/bin/activate; set -u
pip3 install -U pip setuptools wheel pyyaml --no-cache-dir
pip3 install -e "$final_path"
chown -R $app: "$final_path"