old_contents: #!/usr/bin/env python
  # Licensed under a 3-clause BSD style license - see LICENSE.rst
  from __future__ import absolute_import, division, print_function
  #
  # Standard imports
  #
  import glob
  import os
  import sys
  from setuptools import setup, find_packages
  #
  # DESI support code.
  #
  from desiutil.setup import DesiTest, DesiVersion, get_version
  #
  # Begin setup
  #
  setup_keywords = dict()
  #
  # THESE SETTINGS NEED TO BE CHANGED FOR EVERY PRODUCT.
  #
  setup_keywords['name'] = 'desidatamodel'
  setup_keywords['description'] = 'DESI Data Model'
  setup_keywords['author'] = 'DESI Collaboration'
  setup_keywords['author_email'] = 'desi-data@desi.lbl.gov'
  setup_keywords['license'] = 'BSD'
  setup_keywords['url'] = 'https://github.com/desihub/desidatamodel'
  #
  # END OF SETTINGS THAT NEED TO BE CHANGED.
  #
  setup_keywords['version'] = get_version(setup_keywords['name'])
  #
  # Use README.rst as long_description.
  #
  setup_keywords['long_description'] = ''
  if os.path.exists('README.rst'):
      with open('README.rst') as readme:
          setup_keywords['long_description'] = readme.read()
  #
  # Set other keywords for the setup function.  These are automated, & should
  # be left alone unless you are an expert.
  #
  # Treat everything in bin/ except *.rst as a script to be installed.
  #
  if os.path.isdir('bin'):
      setup_keywords['scripts'] = [fname for fname in glob.glob(os.path.join('bin', '*'))
          if not os.path.basename(fname).endswith('.rst')]
  setup_keywords['provides'] = [setup_keywords['name']]
  setup_keywords['requires'] = ['Python (>2.7.0)']
  # setup_keywords['install_requires'] = ['Python (>2.7.0)']
  setup_keywords['zip_safe'] = False
  setup_keywords['use_2to3'] = True
  setup_keywords['packages'] = find_packages('py')
  setup_keywords['package_dir'] = {'':'py'}
  setup_keywords['cmdclass'] = {'version': DesiVersion,'test': DesiTest}
  setup_keywords['test_suite']='{name}.test.{name}_test_suite.{name}_test_suite'.format(**setup_keywords)
  #
  # Autogenerate command-line scripts.
  #
  # setup_keywords['entry_points'] = {'console_scripts':['generate_model = desidatamodel.stub.main:main']}
  #
  # Add internal data directories.
  #
  setup_keywords['package_data'] = {'desidatamodel.test': ['t/*']}
  #
  # Run setup command.
  #
  setup(**setup_keywords)
  
new_contents: #!/usr/bin/env python
  # Licensed under a 3-clause BSD style license - see LICENSE.rst
  from __future__ import absolute_import, division, print_function
  #
  # Standard imports
  #
  import glob
  import os
  import sys
  from setuptools import setup, find_packages
  #
  # DESI support code.
  #
  from desiutil.setup import DesiTest, DesiVersion, get_version
  #
  # Begin setup
  #
  setup_keywords = dict()
  #
  # THESE SETTINGS NEED TO BE CHANGED FOR EVERY PRODUCT.
  #
  setup_keywords['name'] = 'desidatamodel'
  setup_keywords['description'] = 'DESI Data Model'
  setup_keywords['author'] = 'DESI Collaboration'
  setup_keywords['author_email'] = 'desi-data@desi.lbl.gov'
  setup_keywords['license'] = 'BSD'
  setup_keywords['url'] = 'https://github.com/desihub/desidatamodel'
  #
  # END OF SETTINGS THAT NEED TO BE CHANGED.
  #
  setup_keywords['version'] = get_version(setup_keywords['name'])
  #
  # Use README.rst as long_description.
  #
  setup_keywords['long_description'] = ''
  if os.path.exists('README.rst'):
      with open('README.rst') as readme:
          setup_keywords['long_description'] = readme.read()
  #
  # Set other keywords for the setup function.  These are automated, & should
  # be left alone unless you are an expert.
  #
  # Treat everything in bin/ except *.rst as a script to be installed.
  #
  if os.path.isdir('bin'):
      setup_keywords['scripts'] = [fname for fname in glob.glob(os.path.join('bin', '*'))
          if not os.path.basename(fname).endswith('.rst')]
  setup_keywords['provides'] = [setup_keywords['name']]
  setup_keywords['requires'] = ['Python (>2.7.0)']
  # setup_keywords['install_requires'] = ['Python (>2.7.0)']
  setup_keywords['zip_safe'] = False
  setup_keywords['use_2to3'] = False
  setup_keywords['packages'] = find_packages('py')
  setup_keywords['package_dir'] = {'':'py'}
  setup_keywords['cmdclass'] = {'version': DesiVersion,'test': DesiTest}
  setup_keywords['test_suite']='{name}.test.{name}_test_suite.{name}_test_suite'.format(**setup_keywords)
  #
  # Autogenerate command-line scripts.
  #
  # setup_keywords['entry_points'] = {'console_scripts':['generate_model = desidatamodel.stub.main:main']}
  #
  # Add internal data directories.
  #
  setup_keywords['package_data'] = {'desidatamodel.test': ['t/*']}
  #
  # Run setup command.
  #
  setup(**setup_keywords)
  
subject: tweak setup.py