2022-07-11 20:34:24 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
#=================================================
|
2024-01-18 21:02:26 +01:00
|
|
|
# COMMON VARIABLES
|
2022-07-11 20:34:24 +02:00
|
|
|
#=================================================
|
|
|
|
|
2022-08-15 16:56:45 +02:00
|
|
|
#=================================================
|
2024-01-18 21:02:26 +01:00
|
|
|
# PERSONAL HELPERS
|
2022-08-15 16:56:45 +02:00
|
|
|
#=================================================
|
|
|
|
|
2024-01-18 21:02:26 +01:00
|
|
|
_install_fmd_venv() {
|
|
|
|
ynh_exec_as "$app" python3 -m venv --upgrade "$install_dir/venv"
|
2022-08-15 16:56:45 +02:00
|
|
|
|
2024-01-18 21:02:26 +01:00
|
|
|
venvpython="$install_dir/venv/bin/python3"
|
2022-08-15 16:56:45 +02:00
|
|
|
|
2024-01-18 21:02:26 +01:00
|
|
|
ynh_add_config --template="requirements.txt" --destination="$install_dir/requirements.txt"
|
2022-07-11 20:34:24 +02:00
|
|
|
|
2024-01-18 21:02:26 +01:00
|
|
|
ynh_exec_as "$app" "$venvpython" -m ensurepip
|
|
|
|
ynh_exec_as "$app" "$venvpython" -m pip install --upgrade wheel pip setuptools
|
|
|
|
ynh_exec_as "$app" "$venvpython" -m pip install --no-deps -r "$install_dir/requirements.txt"
|
|
|
|
}
|
2022-07-11 20:34:24 +02:00
|
|
|
|
|
|
|
#=================================================
|
2024-01-18 21:02:26 +01:00
|
|
|
# EXPERIMENTAL HELPERS
|
2022-07-11 20:34:24 +02:00
|
|
|
#=================================================
|
|
|
|
|
|
|
|
#=================================================
|
2024-01-18 21:02:26 +01:00
|
|
|
# FUTURE OFFICIAL HELPERS
|
2022-07-11 20:34:24 +02:00
|
|
|
#=================================================
|