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:
parent
06ff548a76
commit
ba0810238f
4 changed files with 13 additions and 9 deletions
|
@ -12,13 +12,16 @@ chmod-socket = 666
|
||||||
# Plugin to use and interpretor config
|
# Plugin to use and interpretor config
|
||||||
single-interpreter = true
|
single-interpreter = true
|
||||||
master = true
|
master = true
|
||||||
plugin = python
|
plugin = python3
|
||||||
lazy-apps = true
|
lazy-apps = true
|
||||||
enable-threads = true
|
enable-threads = true
|
||||||
|
|
||||||
# Application base folder
|
# Application base folder
|
||||||
base = __FINALPATH__
|
base = __FINALPATH__
|
||||||
|
|
||||||
|
# Support running the module from a webserver subdirectory.
|
||||||
|
route-run = fixpathinfo:
|
||||||
|
|
||||||
# Module to import
|
# Module to import
|
||||||
module = __APP__.webapp
|
module = __APP__.webapp
|
||||||
|
|
||||||
|
|
|
@ -5,4 +5,4 @@
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# dependencies used by the app
|
# 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"
|
||||||
|
|
|
@ -98,10 +98,10 @@ ynh_replace_string --match_string="werkzeug.contrib.fixers" --replace_string="we
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Installing Searx..."
|
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
|
set +u; source $final_path/bin/activate; set -u
|
||||||
pip install -U setuptools
|
pip3 install -U pip setuptools
|
||||||
pip install --requirement $final_path/requirements-ynh.txt
|
pip3 install --requirement $final_path/requirements-ynh.txt
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CONFIGURE SEARX
|
# CONFIGURE SEARX
|
||||||
|
|
|
@ -123,11 +123,12 @@ ynh_system_user_create --username=$app
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Upgrading Searx..." --weight=7
|
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-*
|
# Clean venv if it still on python2
|
||||||
virtualenv --system-site-packages "$final_path"
|
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
|
set +u; source $final_path/bin/activate; set -u
|
||||||
pip install -U setuptools
|
pip3 install -U pip setuptools
|
||||||
pip install --requirement $final_path/requirements-ynh.txt --upgrade
|
pip3 install --requirement $final_path/requirements-ynh.txt --upgrade
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CONFIGURE SEARX
|
# CONFIGURE SEARX
|
||||||
|
|
Loading…
Add table
Reference in a new issue