old_contents: from setuptools import setup, find_packages
  import os, subprocess
  
  version_py = os.path.join(os.path.dirname(__file__), 'plotpot/version.py')
  
  try:
      version_git = subprocess.check_output(["git", "describe", "--always", "--dirty"]).rstrip().decode('utf-8')
  except:
      with open(version_py, 'r') as fh:
          version_git = fh.read().strip().split('=')[-1].replace('"','')
          fh.close()
  
  version_msg = "# Do not edit this file, pipeline versioning is governed by git tags"
  line = version_msg + os.linesep + "__version__=\"" + version_git +'\"'
  
  with open(version_py, 'w') as fh:
      fh.write(line)
      fh.close()
  
  setup(
      name='plotpot',
      version="1.0-r{ver}".format(ver=version_git),
      description='Plot potentiostat data from various instruments',
      author='Alexander Pohl',
      author_email='a.h.pohl@gmail.com',
      url='ssh://syno.ahpohl.com:2222/volume1/git_repos/plotpot.git',
      license='MIT',
      packages=find_packages(),
  )
  
new_contents: from setuptools import setup, find_packages
  import os, subprocess
  
  version_py = os.path.join(os.path.dirname(__file__), 'plotpot/version.py')
  
  try:
      version_git = subprocess.check_output(["git", "describe", "--always", "--dirty"]).rstrip().decode('utf-8')
  except:
      with open(version_py, 'r') as fh:
          version_git = fh.read().strip().split('=')[-1].replace('"','')
          fh.close()
  
  version_msg = "# Do not edit this file, pipeline versioning is governed by git tags"
  line = version_msg + os.linesep + "__version__=\"" + version_git +'\"'
  
  with open(version_py, 'w') as fh:
      fh.write(line)
      fh.close()
  
  setup(
      name='plotpot',
      version="".format(ver=version_git),
      description='Plot potentiostat data created with Convpot',
      author='Alexander Pohl',
      author_email='alex@ahpohl.com',
      url='https://github.com/ahpohl/plotpot.git',
      license='MIT',
      packages=find_packages(),
  )
  
subject: edit setup.py