Version type
We need a version type, which validates version strings and can compare them in accordance with vercmp
.
In repod we have this functionality implemented in Python to not dependent on pyalpm (due to cross-platform issues): https://gitlab.archlinux.org/archlinux/repod/-/blob/cc0e43c7c858c679027068639e7db554fb78aa21/repod/version/alpm.py and https://gitlab.archlinux.org/archlinux/repod/-/blob/cc0e43c7c858c679027068639e7db554fb78aa21/repod/common/models.py#L520-650
My belief is, that it would be good to be able to derive all version components from this type (i.e. Epoch, Pkgver, Pkgrel) as well (similar to how it is done in repod).