mirror of
https://github.com/YunoHost-Apps/libretranslate_ynh.git
synced 2024-09-03 19:36:00 +02:00
virtualenv
This commit is contained in:
parent
50f139fb0c
commit
1c83063339
3 changed files with 6 additions and 10 deletions
|
@ -48,4 +48,4 @@ ram.runtime = "50M"
|
|||
[resources.ports]
|
||||
|
||||
[resources.apt]
|
||||
packages = "python3, python3-venv"
|
||||
packages = "python3, python3-dev, python3-pip, virtualenv"
|
||||
|
|
|
@ -21,15 +21,12 @@ chown -R $app:www-data "$install_dir"
|
|||
#=================================================
|
||||
# SPECIFIC SETUP
|
||||
#=================================================
|
||||
ynh_script_progression --message="Installing dependencies..." --weight=2
|
||||
|
||||
ynh_exec_warn_less python3 -m pip install pipenv
|
||||
|
||||
ynh_script_progression --message="Installing LibreTranslate..." --weight=2
|
||||
|
||||
ynh_exec_as $app virtualenv --python=python3 --system-site-packages "$install_dir/venv"
|
||||
|
||||
pushd $install_dir
|
||||
mkdir -p .venv
|
||||
PIPENV_VENV_IN_PROJECT="enabled" PIPENV_SKIP_LOCK=true ynh_exec_warn_less python3 -m pipenv install libretranslate==$libretranslate_version 2>&1
|
||||
ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH pip install libretranslate==$libretranslate_version
|
||||
popd
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -38,11 +38,10 @@ chown -R $app:www-data "$install_dir"
|
|||
#=================================================
|
||||
ynh_script_progression --message="Installing LibreTranslate..." --weight=2
|
||||
|
||||
ynh_exec_warn_less python3 -m pip install pipenv
|
||||
ynh_exec_as $app virtualenv --python=python3 --system-site-packages "$install_dir/venv"
|
||||
|
||||
pushd $install_dir
|
||||
mkdir -p .venv
|
||||
PIPENV_VENV_IN_PROJECT="enabled" PIPENV_SKIP_LOCK=true ynh_exec_warn_less python3 -m pipenv install libretranslate==$libretranslate_version 2>&1
|
||||
ynh_exec_warn_less ynh_exec_as $app env PATH=$PATH pip install libretranslate==$libretranslate_version
|
||||
popd
|
||||
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue