astropy/astropy — pull request #487 by iguananaut (2012-11-16 21:19:54+00:00)
Title: An alternate fix to #423

The problem was that generate_version_py did not run even when the git revision count changed, because version.version would always return a version string with the latest revision. Now version.py contains a separate variable called _last_generated_version which contains the version string that version.py was last generated with. If that version is out of date a new version.py is generated.