prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  make setup.py an executable script
  Change file permissions and reformat the shebang line
  
  </issue>
  <code>
  [start of setup.py]
  1 # !/usr/bin/env python
  2 
  3 import os
  4 from setuptools import setup, find_packages
  5 
  6 
  7 def package_files(directory):
  8     paths = []
  9     for (path, directories, filenames) in os.walk(directory):
  10         for filename in filenames:
  11             paths.append(os.path.join('..', path, filename))
  12     return paths
  13 
  14 
  15 here = os.path.abspath(os.path.dirname(__file__))
  16 
  17 extra_files = package_files(os.path.join(here, 'WrightTools', 'datasets'))
  18 extra_files.append(os.path.join(here, 'CONTRIBUTORS'))
  19 extra_files.append(os.path.join(here, 'LICENSE'))
  20 extra_files.append(os.path.join(here, 'README.rst'))
  21 extra_files.append(os.path.join(here, 'requirements.txt'))
  22 extra_files.append(os.path.join(here, 'VERSION'))
  23 extra_files.append(os.path.join(here, 'WrightTools', 'client_secrets.json'))
  24 
  25 with open(os.path.join(here, 'requirements.txt')) as f:
  26     required = f.read().splitlines()
  27 
  28 with open(os.path.join(here, 'VERSION')) as version_file:
  29     version = version_file.read().strip()
  30 
  31 setup(
  32     name='WrightTools',
  33     packages=find_packages(),
  34     package_data={'': extra_files},
  35     setup_requires=['pytest-runner'],
  36     tests_require=['pytest'],
  37     install_requires=required,
  38     extras_require={'docs': ['sphinx-gallery>=0.1.9']},
  39     version=version,
  40     description='Tools for loading, processing, and plotting multidimensional spectroscopy data.',
  41     author='Blaise Thompson',
  42     author_email='blaise@untzag.com',
  43     license='MIT',
  44     url='http://wright.tools',
  45     keywords='spectroscopy science multidimensional visualization',
  46     classifiers=['Development Status :: 5 - Production/Stable',
  47                  'Intended Audience :: Science/Research',
  48                  'License :: OSI Approved :: MIT License',
  49                  'Natural Language :: English',
  50                  'Programming Language :: Python :: 2',
  51                  'Programming Language :: Python :: 2.7',
  52                  'Programming Language :: Python :: 3',
  53                  'Programming Language :: Python :: 3.3',
  54                  'Programming Language :: Python :: 3.4',
  55                  'Programming Language :: Python :: 3.5',
  56                  'Topic :: Scientific/Engineering']
  57 )
  58
  [end of setup.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/setup.py b/setup.py
  old mode 100644
  new mode 100755
  --- a/setup.py
  +++ b/setup.py
  @@ -1,4 +1,4 @@
  -# !/usr/bin/env python
  +#! /usr/bin/env python
   
   import os
   from setuptools import setup, find_packages
  
verification_info: {"golden_diff": "diff --git a/setup.py b/setup.py\nold mode 100644\nnew mode 100755\n--- a/setup.py\n+++ b/setup.py\n@@ -1,4 +1,4 @@\n-# !/usr/bin/env python\n+#! /usr/bin/env python\n \n import os\n from setuptools import setup, find_packages\n", "issue": "make setup.py an executable script\nChange file permissions and reformat the shebang line\n", "before_files": [{"content": "# !/usr/bin/env python\n\nimport os\nfrom setuptools import setup, find_packages\n\n\ndef package_files(directory):\n    paths = []\n    for (path, directories, filenames) in os.walk(directory):\n        for filename in filenames:\n            paths.append(os.path.join('..', path, filename))\n    return paths\n\n\nhere = os.path.abspath(os.path.dirname(__file__))\n\nextra_files = package_files(os.path.join(here, 'WrightTools', 'datasets'))\nextra_files.append(os.path.join(here, 'CONTRIBUTORS'))\nextra_files.append(os.path.join(here, 'LICENSE'))\nextra_files.append(os.path.join(here, 'README.rst'))\nextra_files.append(os.path.join(here, 'requirements.txt'))\nextra_files.append(os.path.join(here, 'VERSION'))\nextra_files.append(os.path.join(here, 'WrightTools', 'client_secrets.json'))\n\nwith open(os.path.join(here, 'requirements.txt')) as f:\n    required = f.read().splitlines()\n\nwith open(os.path.join(here, 'VERSION')) as version_file:\n    version = version_file.read().strip()\n\nsetup(\n    name='WrightTools',\n    packages=find_packages(),\n    package_data={'': extra_files},\n    setup_requires=['pytest-runner'],\n    tests_require=['pytest'],\n    install_requires=required,\n    extras_require={'docs': ['sphinx-gallery>=0.1.9']},\n    version=version,\n    description='Tools for loading, processing, and plotting multidimensional spectroscopy data.',\n    author='Blaise Thompson',\n    author_email='blaise@untzag.com',\n    license='MIT',\n    url='http://wright.tools',\n    keywords='spectroscopy science multidimensional visualization',\n    classifiers=['Development Status :: 5 - Production/Stable',\n                 'Intended Audience :: Science/Research',\n                 'License :: OSI Approved :: MIT License',\n                 'Natural Language :: English',\n                 'Programming Language :: Python :: 2',\n                 'Programming Language :: Python :: 2.7',\n                 'Programming Language :: Python :: 3',\n                 'Programming Language :: Python :: 3.3',\n                 'Programming Language :: Python :: 3.4',\n                 'Programming Language :: Python :: 3.5',\n                 'Topic :: Scientific/Engineering']\n)\n", "path": "setup.py"}]}