mirror of
https://github.com/YunoHost-Apps/homeassistant_ynh.git
synced 2024-09-03 19:26:16 +02:00
Remove old python directories before recreating them
This commit is contained in:
parent
feb7e85986
commit
04da7f1670
2 changed files with 5 additions and 1 deletions
|
@ -5,7 +5,7 @@ name = "Home Assistant"
|
|||
description.en = "Home automation platform"
|
||||
description.fr = "Plateforme domotique"
|
||||
|
||||
version = "2023.10.1~ynh1"
|
||||
version = "2023.10.1~ynh2"
|
||||
|
||||
maintainers = ["ewilly"]
|
||||
|
||||
|
|
|
@ -149,6 +149,10 @@ myynh_upgrade_venv_directory () {
|
|||
# Remove old python links before recreating them
|
||||
find "$install_dir/bin/" -type l -name 'python*' -exec bash -c 'rm -f "$1"' _ {} \;
|
||||
|
||||
# Remove old python directories before recreating them
|
||||
find "$install_dir/lib/" -mindepth 1 -maxdepth 1 -type d -name "python*" -not -path "*/python${py_required_version%.*}" -exec bash -c 'rm -Rf "$1"' _ {} \;
|
||||
find "$install_dir/include/site/" -mindepth 1 -maxdepth 1 -type d -name "python*" -not -path "*/python${py_required_version%.*}" -exec bash -c 'rm -Rf "$1"' _ {} \;
|
||||
|
||||
# Upgrade the virtual environment directory
|
||||
ynh_exec_as $app $py_app_version -m venv --upgrade "$install_dir"
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue