BLD: setup.py version strings. handle shallow clones and installing from sdist
Merge pull request #6217 from y-p/PR_setuppy_version

BLD: setup.py version strings. handle shallow clones and installing from sdist