This is a setuptools_scm plugin that adds support for git archives, for example the ones GitHub automatically generates. Note that it only works for archives of tagged commits, because git currently lacks a format option equivalent to git describe --tags.