It seems like a generally nice idea. a couple of things though
I think it'd be good to get the dpkg info if it looks like it is installed.
possibly if the __file__ here is in some set of expected install paths... the problem with that is that dpkg -S 'filename' is heavy, and requires dpkg.
Alternatively, and maybe better, we could have the package install a file that states its version.
and then just read that.
It seems like a generally nice idea. a couple of things though
I think it'd be good to get the dpkg info if it looks like it is installed.
possibly if the __file__ here is in some set of expected install paths... the problem with that is that dpkg -S 'filename' is heavy, and requires dpkg.
Alternatively, and maybe better, we could have the package install a file that states its version.
and then just read that.