old_contents: import os
  import subprocess
  
  # BEFORE importing distutils, remove MANIFEST. distutils doesn't
  # properly update it when the contents of directories change.
  if os.path.exists('MANIFEST'): os.remove('MANIFEST')
  
  from distutils.core import setup
  
  MAJOR               = 0
  MINOR               = 2
  MICRO               = 0
  ISRELEASED          = True
  VERSION             = '%d.%d.%d' % (MAJOR, MINOR, MICRO)
  
  dev_version_py = 'pytopkapi/__dev_version.py'
  
  def generate_version_py(filename):
      try:
          if os.path.exists(".git"):
              # should be a Git clone, use revision info from Git
              s = subprocess.Popen(["git", "rev-parse", "HEAD"],
                      stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
              out = s.communicate()[0]
              GIT_REVISION = out.strip()
          elif os.path.exists(dev_version_py):
              # should be a source distribution, use existing dev
              # version file
              from pytopkapi.__dev_version import git_revision as GIT_REVISION
          else:
              GIT_REVISION = "Unknwn"
      except:
          GIT_REVISION = "Unknwn"
  
      FULL_VERSION = VERSION
      if not ISRELEASED:
          FULL_VERSION += '.dev'
          FULL_VERSION += GIT_REVISION[:6]
  
      cnt = """\
  # This file was autogenerated
  version = '%s'
  git_revision = '%s'
  """
      cnt = cnt % (FULL_VERSION, GIT_REVISION)
  
      f = open(filename, "w")
      try:
          f.write(cnt)
      finally:
          f.close()
  
      return FULL_VERSION, GIT_REVISION
  
  if __name__ == '__main__':
      full_version, git_rev = generate_version_py(dev_version_py)
  
      setup(name='PyTOPKAPI',
            version=full_version,
            description='SAHG TOPKAPI model implementation',
            license='BSD',
            author='Theo Vischel & Scott Sinclair',
            author_email='theo.vischel@hmg.inpg.fr; sinclaird@ukzn.ac.za',
            packages=['pytopkapi',
                      'pytopkapi.parameter_utils',
                      'pytopkapi.results_analysis'],
            )
  
  
new_contents: import os
  import subprocess
  
  # BEFORE importing distutils, remove MANIFEST. distutils doesn't
  # properly update it when the contents of directories change.
  if os.path.exists('MANIFEST'): os.remove('MANIFEST')
  
  from distutils.core import setup
  
  MAJOR               = 0
  MINOR               = 3
  MICRO               = 0
  ISRELEASED          = False
  VERSION             = '%d.%d.%d' % (MAJOR, MINOR, MICRO)
  
  dev_version_py = 'pytopkapi/__dev_version.py'
  
  def generate_version_py(filename):
      try:
          if os.path.exists(".git"):
              # should be a Git clone, use revision info from Git
              s = subprocess.Popen(["git", "rev-parse", "HEAD"],
                      stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
              out = s.communicate()[0]
              GIT_REVISION = out.strip()
          elif os.path.exists(dev_version_py):
              # should be a source distribution, use existing dev
              # version file
              from pytopkapi.__dev_version import git_revision as GIT_REVISION
          else:
              GIT_REVISION = "Unknwn"
      except:
          GIT_REVISION = "Unknwn"
  
      FULL_VERSION = VERSION
      if not ISRELEASED:
          FULL_VERSION += '.dev'
          FULL_VERSION += GIT_REVISION[:6]
  
      cnt = """\
  # This file was autogenerated
  version = '%s'
  git_revision = '%s'
  """
      cnt = cnt % (FULL_VERSION, GIT_REVISION)
  
      f = open(filename, "w")
      try:
          f.write(cnt)
      finally:
          f.close()
  
      return FULL_VERSION, GIT_REVISION
  
  if __name__ == '__main__':
      full_version, git_rev = generate_version_py(dev_version_py)
  
      setup(name='PyTOPKAPI',
            version=full_version,
            description='SAHG TOPKAPI model implementation',
            license='BSD',
            author='Theo Vischel & Scott Sinclair',
            author_email='theo.vischel@hmg.inpg.fr; sinclaird@ukzn.ac.za',
            packages=['pytopkapi',
                      'pytopkapi.parameter_utils',
                      'pytopkapi.results_analysis'],
            )
  
  
subject: Bump version number to 0.3 and mark as development version