prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  python -m pip install -U . doesn't work.
  It ought to be possible to install pytype using pip by running
  
  ```
  python -m pip install -U .
  ```
  
  but doing so causes an error message.
  
  
  </issue>
  <code>
  [start of setup.py]
  1 #!/usr/bin/env python
  2 
  3 # pylint: disable=bad-indentation
  4 
  5 from distutils.core import setup
  6 
  7 import glob
  8 import os
  9 
  10 
  11 def scan_package_data(path, pattern):
  12     result = []
  13     for subdir, _, _ in os.walk(path):
  14         full_pattern = os.path.join(subdir, pattern)
  15         if glob.glob(full_pattern):
  16           # Once we know that it matches files, we store the pattern itself.
  17           result.append(full_pattern)
  18     return result
  19 
  20 
  21 typeshed = scan_package_data('typeshed', '*.pyi')
  22 assert 'typeshed/stdlib/2.7/*.pyi' in typeshed
  23 
  24 
  25 setup(
  26     name='pytype',
  27     version='0.2',
  28     description='Python type inferencer',
  29     maintainer='Google',
  30     maintainer_email='pytypedecl-dev@googlegroups.com',
  31     url='http://github.com/google/pytype',
  32     packages=['pytype',
  33               'pytype/pyc',
  34               'pytype/pytd',
  35               'pytype/pytd/parse',
  36              ],
  37     scripts=['scripts/pytype', 'scripts/pytd'],
  38     package_data={'pytype': ['pytd/builtins/*',
  39                              'pytd/stdlib/*',
  40                             ] + typeshed},
  41     requires=['ply (>=3.4)'],
  42     install_requires=['ply>=3.4'],
  43 )
  44
  [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
  --- a/setup.py
  +++ b/setup.py
  @@ -36,7 +36,8 @@
                ],
       scripts=['scripts/pytype', 'scripts/pytd'],
       package_data={'pytype': ['pytd/builtins/*',
  -                             'pytd/stdlib/*',
  +                             'pytd/stdlib/os/*.pytd',
  +                             'pytd/stdlib/*.pytd',
                               ] + typeshed},
       requires=['ply (>=3.4)'],
       install_requires=['ply>=3.4'],
  
verification_info: {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -36,7 +36,8 @@\n              ],\n     scripts=['scripts/pytype', 'scripts/pytd'],\n     package_data={'pytype': ['pytd/builtins/*',\n-                             'pytd/stdlib/*',\n+                             'pytd/stdlib/os/*.pytd',\n+                             'pytd/stdlib/*.pytd',\n                             ] + typeshed},\n     requires=['ply (>=3.4)'],\n     install_requires=['ply>=3.4'],\n", "issue": "python -m pip install -U . doesn't work.\nIt ought to be possible to install pytype using pip by running\n\n```\npython -m pip install -U .\n```\n\nbut doing so causes an error message.\n\n", "before_files": [{"content": "#!/usr/bin/env python\n\n# pylint: disable=bad-indentation\n\nfrom distutils.core import setup\n\nimport glob\nimport os\n\n\ndef scan_package_data(path, pattern):\n    result = []\n    for subdir, _, _ in os.walk(path):\n        full_pattern = os.path.join(subdir, pattern)\n        if glob.glob(full_pattern):\n          # Once we know that it matches files, we store the pattern itself.\n          result.append(full_pattern)\n    return result\n\n\ntypeshed = scan_package_data('typeshed', '*.pyi')\nassert 'typeshed/stdlib/2.7/*.pyi' in typeshed\n\n\nsetup(\n    name='pytype',\n    version='0.2',\n    description='Python type inferencer',\n    maintainer='Google',\n    maintainer_email='pytypedecl-dev@googlegroups.com',\n    url='http://github.com/google/pytype',\n    packages=['pytype',\n              'pytype/pyc',\n              'pytype/pytd',\n              'pytype/pytd/parse',\n             ],\n    scripts=['scripts/pytype', 'scripts/pytd'],\n    package_data={'pytype': ['pytd/builtins/*',\n                             'pytd/stdlib/*',\n                            ] + typeshed},\n    requires=['ply (>=3.4)'],\n    install_requires=['ply>=3.4'],\n)\n", "path": "setup.py"}]}