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:
parent
dd0a74fe1c
commit
7edcfe909d
1 changed files with 8 additions and 16 deletions
|
@ -140,22 +140,14 @@ ynh_add_nginx_config "path_no_root"
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Upgrading SearXNG..." --weight=2
|
ynh_script_progression --message="Upgrading SearXNG..." --weight=2
|
||||||
|
|
||||||
# Clean venv if it still on python2
|
ynh_secure_remove --file="$final_path/venv"
|
||||||
if [ ! -e $final_path/bin/python3 ]
|
|
||||||
then
|
python3 -m venv --system-site-packages "$final_path/venv"
|
||||||
ynh_regex_secure_remove --file=$final_path/lib/ --regex='python[^/.]*'
|
|
||||||
ynh_regex_secure_remove --file=$final_path/lib64/ --regex='python[^/.]*'
|
set +u; source $final_path/venv/bin/activate; set -u
|
||||||
ynh_regex_secure_remove --file=$final_path/share/python-wheels
|
pip3 install -U pip setuptools wheel pyyaml --no-cache-dir
|
||||||
fi
|
pip3 install -e "$final_path"
|
||||||
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-[^/.]*'
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
chown -R $app: "$final_path"
|
chown -R $app: "$final_path"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue