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

Update to python3

This commit is contained in:
Josué Tille 2020-04-10 21:31:50 +02:00
parent 06ff548a76
commit ba0810238f
No known key found for this signature in database
GPG key ID: 716A6C99B04194EF
4 changed files with 13 additions and 9 deletions

View file

@ -12,13 +12,16 @@ chmod-socket = 666
# Plugin to use and interpretor config
single-interpreter = true
master = true
plugin = python
plugin = python3
lazy-apps = true
enable-threads = true
# Application base folder
base = __FINALPATH__
# Support running the module from a webserver subdirectory.
route-run = fixpathinfo:
# Module to import
module = __APP__.webapp

View file

@ -5,4 +5,4 @@
#=================================================
# dependencies used by the app
pkg_dependencies="git build-essential libxslt-dev python-dev python-virtualenv python-cffi virtualenv python-babel zlib1g-dev libffi-dev libssl-dev python-lxml uwsgi uwsgi-plugin-python"
pkg_dependencies="git build-essential libxslt-dev python3-dev python3-venv python3-cffi python3-babel zlib1g-dev libffi-dev libssl-dev python3-lxml uwsgi uwsgi-plugin-python3"

View file

@ -98,10 +98,10 @@ ynh_replace_string --match_string="werkzeug.contrib.fixers" --replace_string="we
#=================================================
ynh_script_progression --message="Installing Searx..."
virtualenv --system-site-packages "$final_path"
python3 -m venv "$final_path"
set +u; source $final_path/bin/activate; set -u
pip install -U setuptools
pip install --requirement $final_path/requirements-ynh.txt
pip3 install -U pip setuptools
pip3 install --requirement $final_path/requirements-ynh.txt
#=================================================
# CONFIGURE SEARX

View file

@ -123,11 +123,12 @@ ynh_system_user_create --username=$app
#=================================================
ynh_script_progression --message="Upgrading Searx..." --weight=7
rm -r $final_path/lib/python2.7/site-packages/setuptools $final_path/lib/python2.7/site-packages/setuptools-*
virtualenv --system-site-packages "$final_path"
# Clean venv if it still on python2
test -e $final_path/bin/python3 || ynh_secure_remove --file=$final_path
python3 -m venv "$final_path"
set +u; source $final_path/bin/activate; set -u
pip install -U setuptools
pip install --requirement $final_path/requirements-ynh.txt --upgrade
pip3 install -U pip setuptools
pip3 install --requirement $final_path/requirements-ynh.txt --upgrade
#=================================================
# CONFIGURE SEARX