Use distutils from the standard library, although it implements an older notion of what a version is. But that is fine here.