简体   繁体   中英

How do I let pip to know to remove the systemd service file

In my python package I offer the user to run as a service and then install a.service file.

Is there a way to let pip know to remove it if the package is uninstalled?

Thank you

pip is not a full blown package manager, even less system package manager. It doesn't support post-install or pre-uninstall scripts.

The 2 solutions for your problems are:

  1. Include said service file in your wheels so pip uninstall removes it;

  2. Do not use pip at all, convert your package to rpm or deb .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM