diff --git a/scripts/install b/scripts/install index 1b05268..8e7aff2 100755 --- a/scripts/install +++ b/scripts/install @@ -189,6 +189,9 @@ write_bridge_config mkdir -p /var/log/$app # Configure Mautrix-Bridge python3 -m venv $final_path +if [ -z $HOME ]; then + HOME=$final_path # HACK see https://github.com/mautrix/telegram/issues/661 +fi $final_path/bin/pip3 install --upgrade setuptools wheel # HACK fixes "error: invalid command 'bdist_wheel'" $final_path/bin/pip3 install --upgrade $final_path/src/mautrix-telegram.tar.gz[postgres,speedups,qr_login] # metrics,hq_thumbnails,e2be # -r optional-requirements.txt diff --git a/scripts/upgrade b/scripts/upgrade index 864f9ae..5bf6d51 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -122,11 +122,13 @@ ynh_system_user_create --username=$mautrix_bridge_user # ... #================================================= -if [ "$upgrade_type" == "UPGRADE_APP" ] -then -ynh_script_progression --message="Upgrading python packages..." --weight=1 -$final_path/bin/pip3 install --upgrade setuptools wheel # HACK fixes "error: invalid command 'bdist_wheel'" -$final_path/bin/pip3 install --upgrade $final_path/src/mautrix-telegram.tar.gz[postgres,speedups,qr_login] #,hq_thumbnails +if [ "$upgrade_type" == "UPGRADE_APP" ]; then + ynh_script_progression --message="Upgrading python packages..." --weight=1 + if [ -z $HOME ]; then + HOME=$final_path # HACK see https://github.com/mautrix/telegram/issues/661 + fi + $final_path/bin/pip3 install --upgrade setuptools wheel # HACK fixes "error: invalid command 'bdist_wheel'" + $final_path/bin/pip3 install --upgrade $final_path/src/mautrix-telegram.tar.gz[postgres,speedups,qr_login] #,hq_thumbnails fi #=================================================