I've debugged this somewhat weird issue together with Joseph. It's not related in any way to pip.
Joseph was extracting the Kwant tarball und building it inside some _other_ git repository. Now, in order to determine its version, Kwant's setup.py checks whether it lives inside a git repository and extracts the version from git in that case.
In order to fix this (not very relevant) issue, Kwant's setup.py needs to be taught to only extract the version from git when the repository is a Kwant repository and not something further up the file system hierarchy.