Preferred method for install script for yunohost package? (pip or apt-get)

For the first yunohost package I made for archivebox, I used pip to install the package.

Archivebox has a few other ways it can be installed: they also have a debian package which can be installed.

I’m thinking of changing my install script to install by adding the debian repo, and then installing the package from there using apt-get (this would allow me to more easily get all the dependencies archivebox relies on, including a couple optional features which I’m currently missing).

e.g.

echo "deb http://ppa.launchpad.net/archivebox/archivebox/ubuntu focal main" | sudo tee /etc/apt/sources.list.d/archivebox.list
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C258F79DCC02E369
sudo apt update

Is there a “preferred” way to write install scripts for yunohost? Or any reason not to switch to using this instead of the pip install?

Thanks!

We try to avoid to add debian repo for specific apps. If we do, we install the package and remove the debian repo until the next run of the upgrade script.
You can do that with ynh_install_extra_app_dependencies helpers

https://yunohost.org/en/packaging_apps_helpers

So i think in your case, the pip install is the good way if you do it in a virtualenv. If you don’t do it in a virtualenv it could make some change that can’t be removed simply in the system.