mirror of
https://github.com/YunoHost-Apps/endi_ynh.git
synced 2024-09-03 18:35:54 +02:00
Try to fix upgrade
This commit is contained in:
parent
973d471ded
commit
5ea06ca898
3 changed files with 19 additions and 17 deletions
|
@ -10,13 +10,6 @@ nodejs_version=16
|
|||
# PERSONAL HELPERS
|
||||
#=================================================
|
||||
|
||||
_ynh_caerp_patch_src() {
|
||||
# Patching requirements.txt to use system provided Cython
|
||||
cython_version=$(cython3 --version 2>&1 | sed 's|Cython version ||')
|
||||
sed -i "s|Cython=.*|Cython==$cython_version|" "$install_dir/caerp/requirements.txt"
|
||||
}
|
||||
|
||||
|
||||
_ynh_caerp_build_ui() {
|
||||
ynh_use_nodejs
|
||||
|
||||
|
@ -34,6 +27,9 @@ _ynh_caerp_build_python() {
|
|||
python_venv_site_packages=$(_ynh_python_venv_get_site_packages_dir -d "$install_dir/venv")
|
||||
|
||||
pushd "$install_dir/caerp" 2>&1
|
||||
# Might be a fix for `AttributeError: module 'lib' has no attribute 'X509_V_FLAG_NOTIFY_POLICY'`
|
||||
ynh_exec_as "$app" "$install_dir/venv/bin/python3" -m pip uninstall cryptography
|
||||
|
||||
ynh_exec_as "$app" "$install_dir/venv/bin/python3" -m pip install -r requirements.txt
|
||||
ynh_exec_as "$app" "$install_dir/venv/bin/python3" ./setup.py install 2>&1
|
||||
popd 2>&1
|
||||
|
|
|
@ -32,8 +32,6 @@ ynh_setup_source --dest_dir="$install_dir/caerp"
|
|||
chmod -R o-rwx "$install_dir"
|
||||
chown -R "$app:www-data" "$install_dir"
|
||||
|
||||
# _ynh_caerp_patch_src
|
||||
|
||||
#=================================================
|
||||
# SETUP APPLICATION
|
||||
#=================================================
|
||||
|
|
|
@ -37,6 +37,14 @@ ynh_script_progression --message="Updating NodeJS..." --weight=1
|
|||
|
||||
ynh_exec_warn_less ynh_install_nodejs --nodejs_version="$nodejs_version"
|
||||
|
||||
#=================================================
|
||||
# ENABLE MANDATORY FRENCH LOCALE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Enabling french system locale..." --weight=1
|
||||
|
||||
sed -i 's|^#\? \?\(fr_FR.UTF-8 \?.*\)$|\1|' /etc/locale.gen
|
||||
locale-gen
|
||||
|
||||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
#=================================================
|
||||
|
@ -48,7 +56,13 @@ ynh_setup_source --dest_dir="$install_dir/caerp" --full_replace --keep="endi.ini
|
|||
chmod -R o-rwx "$install_dir"
|
||||
chown -R "$app:www-data" "$install_dir"
|
||||
|
||||
# _ynh_caerp_patch_src
|
||||
#=================================================
|
||||
# SETUP APPLICATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Building $app..." --weight=1
|
||||
|
||||
_ynh_caerp_build_ui
|
||||
_ynh_caerp_build_python
|
||||
|
||||
#=================================================
|
||||
# UPDATE A CONFIG FILE
|
||||
|
@ -60,17 +74,11 @@ ynh_add_config --template="caerp.ini" --destination="$install_dir/caerp.ini"
|
|||
chmod 500 "$install_dir/caerp.ini"
|
||||
chown "$app:$app" "$install_dir/caerp.ini"
|
||||
|
||||
#=================================================
|
||||
# SETUP APPLICATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Building $app..." --weight=1
|
||||
_ynh_caerp_build_ui
|
||||
_ynh_caerp_build_python
|
||||
|
||||
#=================================================
|
||||
# SETUP APPLICATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Migrating databases..." --weight=1
|
||||
|
||||
_ynh_caerp_migratedb
|
||||
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue