@@ -0,0 +1,1479 @@
+%22%22%22%0AVersion numbering. The %60major%60, %60minor%60, and %60bugfix%60%0Avariables hold the respective parts of the version number (bugfix is '0' if%0Aabsent). The %60release%60 variable is True if this is a release, and False if this%0Ais a development version. For the actual version string, use::%0A%0A    from mica import version%0A%0Aor::%0A%0A    from mica import __version__%0A%0ANOTE: this code copied from astropy and modified.  Any license restrictions%0Atherein are applicable.%0A%22%22%22%0A%0Aversion = '0.02dev'%0A%0A_versplit = version.replace('dev', '').split('.')%0Amajor = int(_versplit%5B0%5D)%0Aminor = int(_versplit%5B1%5D)%0Aif len(_versplit) %3C 3:%0A    bugfix = 0%0Aelse:%0A    bugfix = int(_versplit%5B2%5D)%0Adel _versplit%0A%0Arelease = not version.endswith('dev')%0A%0A%0Adef _get_git_devstr():%0A    %22%22%22Determines the number of revisions in this repository and returns %22%22 if%0A    this is not possible.%0A%0A    Returns%0A    -------%0A    devstr : str%0A        A string that begins with 'dev' to be appended to the version number%0A        string.%0A    %22%22%22%0A    from os import path%0A    from subprocess import Popen, PIPE%0A%0A    currdir = path.abspath(path.split(__file__)%5B0%5D)%0A%0A    p = Popen(%5B'git', 'rev-list', 'HEAD'%5D, cwd=currdir,%0A              stdout=PIPE, stderr=PIPE, stdin=PIPE)%0A    stdout, stderr = p.communicate()%0A%0A    if p.returncode != 0:%0A        return ''%0A    else:%0A        revs = stdout.decode('ascii').split('%5Cn')%0A        return  '-r%25s-%25s' %25 (len(revs), revs%5B0%5D%5B:7%5D)%0A%0Aif not release:%0A    version = version + _get_git_devstr()%0A%0A__version__ = version%0A

Add mica.version for semi-dynamic versioning