Generating PEP-440 compliant development releases containing githash

Ordering can be useful given appropriate constraints. For example,
many projects publish sdists and wheels of the heads of public
(development or stable) branches. If the history up to the point
where that value was calculated is immutable, it’s fairly safe to
assume that 1.2.3.0dev456 comes before 1.2.3.0dev789 as long as your
reference is the packages from that authority. If, however, you’re
generating versions from your local topic branch, comparing them to
the published package versions is not guaranteed to provide the same
ordering as your local history may not match the authoritative one.

It’s this precise use case which caused the PBR authors years ago to
abandon attempts to encode the commit ID in PEP-440 versions, and
instead store it in separate metadata so that packages can still
query and report it at runtime for debugging purposes (a command was
also included to list the known commit IDs for all installed Python
packages to ease inspection and cataloguing of the installed
environment).