prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Must explicitly define `setuptools` as a dependency
  When running gunicorn in a hardened Python docker image (with most of the dependencies removed) `setuptools` might be missing.
  
  For instance:
  
  ```
  Traceback (most recent call last):
    File "/app/manage-docker.binary.runfiles/__main__/server.py", line 1, in <module>
      from gunicorn.app.base import BaseApplication
    File "/app/manage-docker.binary.runfiles/pypi__gunicorn_19_7_1/gunicorn/app/base.py", line 12, in <module>
      from gunicorn import util
    File "/app/manage-docker.binary.runfiles/pypi__gunicorn_19_7_1/gunicorn/util.py", line 12, in <module>
      import pkg_resources
  ImportError: No module named pkg_resources
  ```
  
  Can be fixed by defining `setuptools` as a direct dependency within the project' `requirements.txt` file, however, it could be fix at the gunicorn codebase level by using `install_requires = ['setuptools']` in setup.py. 
  
  </issue>
  <code>
  [start of setup.py]
  1 # -*- coding: utf-8 -
  2 #
  3 # This file is part of gunicorn released under the MIT license.
  4 # See the NOTICE for more information.
  5 
  6 import os
  7 import sys
  8 
  9 from setuptools import setup, find_packages
  10 from setuptools.command.test import test as TestCommand
  11 
  12 from gunicorn import __version__
  13 
  14 
  15 CLASSIFIERS = [
  16     'Development Status :: 4 - Beta',
  17     'Environment :: Other Environment',
  18     'Intended Audience :: Developers',
  19     'License :: OSI Approved :: MIT License',
  20     'Operating System :: MacOS :: MacOS X',
  21     'Operating System :: POSIX',
  22     'Programming Language :: Python',
  23     'Programming Language :: Python :: 3',
  24     'Programming Language :: Python :: 3.4',
  25     'Programming Language :: Python :: 3.5',
  26     'Programming Language :: Python :: 3.6',
  27     'Programming Language :: Python :: 3.7',
  28     'Programming Language :: Python :: 3 :: Only',
  29     'Topic :: Internet',
  30     'Topic :: Utilities',
  31     'Topic :: Software Development :: Libraries :: Python Modules',
  32     'Topic :: Internet :: WWW/HTTP',
  33     'Topic :: Internet :: WWW/HTTP :: WSGI',
  34     'Topic :: Internet :: WWW/HTTP :: WSGI :: Server',
  35     'Topic :: Internet :: WWW/HTTP :: Dynamic Content']
  36 
  37 # read long description
  38 with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as f:
  39     long_description = f.read()
  40 
  41 # read dev requirements
  42 fname = os.path.join(os.path.dirname(__file__), 'requirements_test.txt')
  43 with open(fname) as f:
  44     tests_require = [l.strip() for l in f.readlines()]
  45 
  46 class PyTestCommand(TestCommand):
  47     user_options = [
  48         ("cov", None, "measure coverage")
  49     ]
  50 
  51     def initialize_options(self):
  52         TestCommand.initialize_options(self)
  53         self.cov = None
  54 
  55     def finalize_options(self):
  56         TestCommand.finalize_options(self)
  57         self.test_args = ['tests']
  58         if self.cov:
  59             self.test_args += ['--cov', 'gunicorn']
  60         self.test_suite = True
  61 
  62     def run_tests(self):
  63         import pytest
  64         errno = pytest.main(self.test_args)
  65         sys.exit(errno)
  66 
  67 
  68 extra_require = {
  69     'gevent':  ['gevent>=0.13'],
  70     'eventlet': ['eventlet>=0.9.7'],
  71     'tornado': ['tornado>=0.2'],
  72     'gthread': [],
  73 }
  74 
  75 setup(
  76     name='gunicorn',
  77     version=__version__,
  78 
  79     description='WSGI HTTP Server for UNIX',
  80     long_description=long_description,
  81     author='Benoit Chesneau',
  82     author_email='benoitc@e-engura.com',
  83     license='MIT',
  84     url='http://gunicorn.org',
  85 
  86     python_requires='>=3.4',
  87     classifiers=CLASSIFIERS,
  88     zip_safe=False,
  89     packages=find_packages(exclude=['examples', 'tests']),
  90     include_package_data=True,
  91 
  92     tests_require=tests_require,
  93     cmdclass={'test': PyTestCommand},
  94 
  95     entry_points="""
  96     [console_scripts]
  97     gunicorn=gunicorn.app.wsgiapp:run
  98     gunicorn_paster=gunicorn.app.pasterapp:run
  99 
  100     [paste.server_runner]
  101     main=gunicorn.app.pasterapp:paste_server
  102     """,
  103     extras_require=extra_require,
  104 )
  105
  [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
  @@ -65,6 +65,14 @@
           sys.exit(errno)
   
   
  +install_requires = [
  +    # We depend on functioning pkg_resources.working_set.add_entry() and
  +    # pkg_resources.load_entry_point(). These both work as of 3.0 which
  +    # is the first version to support Python 3.4 which we require as a
  +    # floor.
  +    'setuptools>=3.0',
  +]
  +
   extra_require = {
       'gevent':  ['gevent>=0.13'],
       'eventlet': ['eventlet>=0.9.7'],
  @@ -84,6 +92,7 @@
       url='http://gunicorn.org',
   
       python_requires='>=3.4',
  +    install_requires=install_requires,
       classifiers=CLASSIFIERS,
       zip_safe=False,
       packages=find_packages(exclude=['examples', 'tests']),
  
verification_info: {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -65,6 +65,14 @@\n         sys.exit(errno)\n \n \n+install_requires = [\n+    # We depend on functioning pkg_resources.working_set.add_entry() and\n+    # pkg_resources.load_entry_point(). These both work as of 3.0 which\n+    # is the first version to support Python 3.4 which we require as a\n+    # floor.\n+    'setuptools>=3.0',\n+]\n+\n extra_require = {\n     'gevent':  ['gevent>=0.13'],\n     'eventlet': ['eventlet>=0.9.7'],\n@@ -84,6 +92,7 @@\n     url='http://gunicorn.org',\n \n     python_requires='>=3.4',\n+    install_requires=install_requires,\n     classifiers=CLASSIFIERS,\n     zip_safe=False,\n     packages=find_packages(exclude=['examples', 'tests']),\n", "issue": "Must explicitly define `setuptools` as a dependency\nWhen running gunicorn in a hardened Python docker image (with most of the dependencies removed) `setuptools` might be missing.\r\n\r\nFor instance:\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"/app/manage-docker.binary.runfiles/__main__/server.py\", line 1, in <module>\r\n    from gunicorn.app.base import BaseApplication\r\n  File \"/app/manage-docker.binary.runfiles/pypi__gunicorn_19_7_1/gunicorn/app/base.py\", line 12, in <module>\r\n    from gunicorn import util\r\n  File \"/app/manage-docker.binary.runfiles/pypi__gunicorn_19_7_1/gunicorn/util.py\", line 12, in <module>\r\n    import pkg_resources\r\nImportError: No module named pkg_resources\r\n```\r\n\r\nCan be fixed by defining `setuptools` as a direct dependency within the project' `requirements.txt` file, however, it could be fix at the gunicorn codebase level by using `install_requires = ['setuptools']` in setup.py. \n", "before_files": [{"content": "# -*- coding: utf-8 -\n#\n# This file is part of gunicorn released under the MIT license.\n# See the NOTICE for more information.\n\nimport os\nimport sys\n\nfrom setuptools import setup, find_packages\nfrom setuptools.command.test import test as TestCommand\n\nfrom gunicorn import __version__\n\n\nCLASSIFIERS = [\n    'Development Status :: 4 - Beta',\n    'Environment :: Other Environment',\n    'Intended Audience :: Developers',\n    'License :: OSI Approved :: MIT License',\n    'Operating System :: MacOS :: MacOS X',\n    'Operating System :: POSIX',\n    'Programming Language :: Python',\n    'Programming Language :: Python :: 3',\n    'Programming Language :: Python :: 3.4',\n    'Programming Language :: Python :: 3.5',\n    'Programming Language :: Python :: 3.6',\n    'Programming Language :: Python :: 3.7',\n    'Programming Language :: Python :: 3 :: Only',\n    'Topic :: Internet',\n    'Topic :: Utilities',\n    'Topic :: Software Development :: Libraries :: Python Modules',\n    'Topic :: Internet :: WWW/HTTP',\n    'Topic :: Internet :: WWW/HTTP :: WSGI',\n    'Topic :: Internet :: WWW/HTTP :: WSGI :: Server',\n    'Topic :: Internet :: WWW/HTTP :: Dynamic Content']\n\n# read long description\nwith open(os.path.join(os.path.dirname(__file__), 'README.rst')) as f:\n    long_description = f.read()\n\n# read dev requirements\nfname = os.path.join(os.path.dirname(__file__), 'requirements_test.txt')\nwith open(fname) as f:\n    tests_require = [l.strip() for l in f.readlines()]\n\nclass PyTestCommand(TestCommand):\n    user_options = [\n        (\"cov\", None, \"measure coverage\")\n    ]\n\n    def initialize_options(self):\n        TestCommand.initialize_options(self)\n        self.cov = None\n\n    def finalize_options(self):\n        TestCommand.finalize_options(self)\n        self.test_args = ['tests']\n        if self.cov:\n            self.test_args += ['--cov', 'gunicorn']\n        self.test_suite = True\n\n    def run_tests(self):\n        import pytest\n        errno = pytest.main(self.test_args)\n        sys.exit(errno)\n\n\nextra_require = {\n    'gevent':  ['gevent>=0.13'],\n    'eventlet': ['eventlet>=0.9.7'],\n    'tornado': ['tornado>=0.2'],\n    'gthread': [],\n}\n\nsetup(\n    name='gunicorn',\n    version=__version__,\n\n    description='WSGI HTTP Server for UNIX',\n    long_description=long_description,\n    author='Benoit Chesneau',\n    author_email='benoitc@e-engura.com',\n    license='MIT',\n    url='http://gunicorn.org',\n\n    python_requires='>=3.4',\n    classifiers=CLASSIFIERS,\n    zip_safe=False,\n    packages=find_packages(exclude=['examples', 'tests']),\n    include_package_data=True,\n\n    tests_require=tests_require,\n    cmdclass={'test': PyTestCommand},\n\n    entry_points=\"\"\"\n    [console_scripts]\n    gunicorn=gunicorn.app.wsgiapp:run\n    gunicorn_paster=gunicorn.app.pasterapp:run\n\n    [paste.server_runner]\n    main=gunicorn.app.pasterapp:paste_server\n    \"\"\",\n    extras_require=extra_require,\n)\n", "path": "setup.py"}]}