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

Try to fix venv

This commit is contained in:
Salamandar 2024-01-29 18:26:23 +01:00
parent 38ccc82f8e
commit 421b5e3b26
2 changed files with 19 additions and 6 deletions

View file

@ -4,6 +4,19 @@
# COMMON VARIABLES # COMMON VARIABLES
#================================================= #=================================================
#=================================================
# PERSONAL HELPERS
#=================================================
_searx_venv_install() {
ynh_exec_as "$app" python3 -m venv --upgrade "$install_dir/venv"
venvpy="$install_dir/venv/bin/python3"
ynh_exec_as "$app" "$venvpy" -m pip install --upgrade --no-cache-dir pip
ynh_exec_as "$app" "$venvpy" -m pip install setuptools wheel pyyaml
}
#================================================= #=================================================
# UWSGI HELPERS # UWSGI HELPERS
#================================================= #=================================================
@ -89,7 +102,7 @@ ynh_add_uwsgi_service () {
for var_to_replace in $others_var for var_to_replace in $others_var
do do
# ${var_to_replace^^} make the content of the variable on upper-cases # ${var_to_replace^^} make the content of the variable on upper-cases
# ${!var_to_replace} get the content of the variable named $var_to_replace # ${!var_to_replace} get the content of the variable named $var_to_replace
ynh_replace_string --match_string "__${var_to_replace^^}__" --replace_string "${!var_to_replace}" --target_file "$finaluwsgiini" ynh_replace_string --match_string "__${var_to_replace^^}__" --replace_string "${!var_to_replace}" --target_file "$finaluwsgiini"
done done
@ -232,7 +245,7 @@ ynh_regex_secure_remove () {
if [ -z "$regex" ] if [ -z "$regex" ]
then then
ynh_print_info --message="'$file_to_remove' wasn't deleted because it doesn't exist." ynh_print_info --message="'$file_to_remove' wasn't deleted because it doesn't exist."
fi fi
fi fi
fi fi
done <<< "$(echo "$files_to_remove")" done <<< "$(echo "$files_to_remove")"

View file

@ -36,10 +36,10 @@ ynh_add_nginx_config "path_no_root"
#================================================= #=================================================
ynh_script_progression --message="Installing Searx..." --weight=2 ynh_script_progression --message="Installing Searx..." --weight=2
pushd $install_dir _searx_venv_install
python3 -m venv --upgrade "$install_dir/venv"
ynh_exec_as "$app" venv/bin/pip3 install -U pip setuptools wheel pyyaml --no-cache-dir pushd "$install_dir"
ynh_exec_as "$app" venv/bin/pip3 install --requirement $install_dir/requirements-ynh.txt --no-cache-dir ynh_exec_as "$app" "$venvpy" -m pip install --requirement ./requirements-ynh.txt --no-cache-dir
popd popd
#================================================= #=================================================