astropy/astropy — pull request #32 by iguananaut (2011-10-24 19:31:14+00:00)
Title: More setup.py/version fixes

These are two fixes that resulted from an exchange I had with @eteq earlier.

The first is the get rid of a `BUILD` variable in setup.py that was an artifact of PyWCS's setup.py. Instead it uses `astropy.version.release` which has in effect the same semantics (theoretically one might want to do a 'release' build while still under development, but in that remote case the developer may manually remove 'dev' from the version).

The second is another fix to the version.py template. It's now much simpler that before and does not rely on any obscure (and unreliable) machinery in pkg_resources. Instead it just checks if astropy is being imported from within a git working copy, and if so it updates the version string if necessary. If astropy is not being imported from within a git working dir then the version is left "frozen".