old_contents: import os.path
  import subprocess
  
  from setuptools import setup, find_packages
  
  # http://blogs.nopcode.org/brainstorm/2013/05/20/pragmatic-python-versioning-via-setuptools-and-git-tags/
  # Fetch version from git tags, and write to version.py.
  # Also, when git is not available (PyPi package), use stored version.py.
  version_py = os.path.join(os.path.dirname(__file__), 'dame', 'version.py')
  
  try:
      version_git = subprocess.check_output(["git", "describe", "--always"]).rstrip()
  except:
      with open(version_py, 'r') as fh:
          #version_git = open(version_py).read().strip().split('=')[-1].replace('"','')
          version_git = fh.read().strip().split('=')[-1].replace('"','')
  
  version_msg = "# Do not edit this file, pipeline versioning is governed by git tags"
  with open(version_py, 'w') as fh:
      fh.write(version_msg + os.linesep + "__version__='{}'\n".format(version_git))
  
  setup(
          name = "dame",
          version = version_git, 
          packages = find_packages(),
          license = "MIT",
       )
  
new_contents: import os.path
  import subprocess
  
  from setuptools import setup, find_packages
  
  # http://blogs.nopcode.org/brainstorm/2013/05/20/pragmatic-python-versioning-via-setuptools-and-git-tags/
  # Fetch version from git tags, and write to version.py.
  # Also, when git is not available (PyPi package), use stored version.py.
  version_py = os.path.join(os.path.dirname(__file__), 'dame', 'version.py')
  
  try:
      version_git = subprocess.check_output(["git", "describe", "--always"]).rstrip()
  except:
      with open(version_py, 'r') as fh:
          #version_git = open(version_py).read().strip().split('=')[-1].replace('"','')
          version_git = fh.read().strip().split('=')[-1].replace('"','')
  
  version_msg = "# Do not edit this file, pipeline versioning is governed by git tags"
  with open(version_py, 'w') as fh:
      fh.write(version_msg + os.linesep + "__version__='{}'\n".format(version_git))
  
  setup(
          name = "dame",
          author = "Richard Lindsley",
          version = version_git, 
          packages = find_packages(),
          license = "MIT",
          entry_points = {
              'gui_scripts': [
                  'dame = dame.dame:main'
                  ]
              },
       )
  
subject: Update setup to generate the launcher