Add to APT?
Hey, not sure how it works but could this get added to the ubuntu apt repositories?
- Run the following commands in your Linux terminal.
sudo apt install python3 python3-pip
pip3 install ping3
- Use ping3 in your terminal.
ping3 google.com
- If any command has an error, restart your terminal and try again.
I'm making an apt package for my own app, adding a dependent package is trivial, adding a postinst that uses pip to install ping3 feels dirty.
The problem is that I don't know how to make an apt package. I wondering if this can be an apt package since the command is actually running as in python code not binary. Should I build it as a binary file first?
I've started packing simplemonitor (https://github.com/jamesoff/simplemonitor) into Debian. An optional dependency of simplemonitor is ping3, so I might package it. I will comment here (I have a test version but I haven't uploaded it into Debian just yet).
When I packaged this for Debian, and while testing it, doing ping3 google.com raised a PermissionError. I know that the point of ping3 is to be used in Python scripts not as a command line but since it was the first thing that I tried it was not a good start.
I've submitted: https://github.com/kyan001/ping3/pull/73
To handle the exception and give a better user experience, I think.
If this can be merged (and new ping3 released, if possible) I will resume packaging in Debian. I am not sure that it will be included in Debian since it depends on many things...
Update here: the package is available on Debian unstable, as seen in:
- https://tracker.debian.org/pkg/python-ping3
- https://packages.debian.org/search?keywords=python3-ping3&searchon=names&suite=all§ion=all