prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Multiple implementations overwrite each others' entrypoint hooks
  It's not uncommon to find Python 2 and Python 3 coexisting on the same system, and it's not unreasonable for the user to also want Hy for both Pythons. However, where Python handles this gracefully by providing separate executables (`python2` and `python3` alongside `python`, `pip2` and `pip3` alongside `pip` etc) Hy simply bulldozes an existing `hy`, `hyc` etc.
  
  Sorry if this has already been reported; I tried to look for previous issues but nothing much came to mind when I was trying to play guess-the-keyword.
  
  Multiple implementations overwrite each others' entrypoint hooks
  It's not uncommon to find Python 2 and Python 3 coexisting on the same system, and it's not unreasonable for the user to also want Hy for both Pythons. However, where Python handles this gracefully by providing separate executables (`python2` and `python3` alongside `python`, `pip2` and `pip3` alongside `pip` etc) Hy simply bulldozes an existing `hy`, `hyc` etc.
  
  Sorry if this has already been reported; I tried to look for previous issues but nothing much came to mind when I was trying to play guess-the-keyword.
  
  
  </issue>
  <code>
  [start of setup.py]
  1 #!/usr/bin/env python
  2 # Copyright (c) 2012, 2013 Paul Tagliamonte <paultag@debian.org>
  3 #
  4 # Permission is hereby granted, free of charge, to any person obtaining a
  5 # copy of this software and associated documentation files (the "Software"),
  6 # to deal in the Software without restriction, including without limitation
  7 # the rights to use, copy, modify, merge, publish, distribute, sublicense,
  8 # and/or sell copies of the Software, and to permit persons to whom the
  9 # Software is furnished to do so, subject to the following conditions:
  10 #
  11 # The above copyright notice and this permission notice shall be included in
  12 # all copies or substantial portions of the Software.
  13 #
  14 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
  17 # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  19 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  20 # DEALINGS IN THE SOFTWARE.
  21 
  22 import os
  23 import re
  24 import sys
  25 
  26 from setuptools import find_packages, setup
  27 
  28 PKG = "hy"
  29 VERSIONFILE = os.path.join(PKG, "version.py")
  30 verstr = "unknown"
  31 try:
  32     verstrline = open(VERSIONFILE, "rt").read()
  33 except EnvironmentError:
  34     pass  # Okay, there is no version file.
  35 else:
  36     VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]"
  37     mo = re.search(VSRE, verstrline, re.M)
  38     if mo:
  39         __version__ = mo.group(1)
  40     else:
  41         msg = "if %s.py exists, it is required to be well-formed" % VERSIONFILE
  42         raise RuntimeError(msg)
  43 
  44 long_description = """Hy is a Python <--> Lisp layer. It helps
  45 make things work nicer, and lets Python and the Hy lisp variant play
  46 nice together. """
  47 
  48 install_requires = ['rply>=0.7.0', 'astor>=0.5', 'clint>=0.4']
  49 if sys.version_info[:2] < (2, 7):
  50     install_requires.append('argparse>=1.2.1')
  51     install_requires.append('importlib>=1.0.2')
  52 if os.name == 'nt':
  53     install_requires.append('pyreadline==2.0')
  54 
  55 setup(
  56     name=PKG,
  57     version=__version__,
  58     install_requires=install_requires,
  59     entry_points={
  60         'console_scripts': [
  61             'hy = hy.cmdline:hy_main',
  62             'hyc = hy.cmdline:hyc_main',
  63             'hy2py = hy.cmdline:hy2py_main',
  64         ]
  65     },
  66     packages=find_packages(exclude=['tests*']),
  67     package_data={
  68         'hy.contrib': ['*.hy'],
  69         'hy.core': ['*.hy'],
  70     },
  71     author="Paul Tagliamonte",
  72     author_email="tag@pault.ag",
  73     long_description=long_description,
  74     description='Lisp and Python love each other.',
  75     license="Expat",
  76     url="http://hylang.org/",
  77     platforms=['any'],
  78     classifiers=[
  79         "Development Status :: 4 - Beta",
  80         "Intended Audience :: Developers",
  81         "License :: DFSG approved",
  82         "License :: OSI Approved :: MIT License",  # Really "Expat". Ugh.
  83         "Operating System :: OS Independent",
  84         "Programming Language :: Lisp",
  85         "Programming Language :: Python",
  86         "Programming Language :: Python :: 2",
  87         "Programming Language :: Python :: 2.6",
  88         "Programming Language :: Python :: 2.7",
  89         "Programming Language :: Python :: 3",
  90         "Programming Language :: Python :: 3.3",
  91         "Programming Language :: Python :: 3.4",
  92         "Topic :: Software Development :: Code Generators",
  93         "Topic :: Software Development :: Compilers",
  94         "Topic :: Software Development :: Libraries",
  95     ]
  96 )
  97
  [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
  @@ -52,6 +52,8 @@
   if os.name == 'nt':
       install_requires.append('pyreadline==2.0')
   
  +ver = sys.version_info[0]
  +
   setup(
       name=PKG,
       version=__version__,
  @@ -59,8 +61,11 @@
       entry_points={
           'console_scripts': [
               'hy = hy.cmdline:hy_main',
  +            'hy%d = hy.cmdline:hy_main' % ver,
               'hyc = hy.cmdline:hyc_main',
  +            'hyc%d = hy.cmdline:hyc_main' % ver,
               'hy2py = hy.cmdline:hy2py_main',
  +            'hy2py%d = hy.cmdline:hy2py_main' % ver,
           ]
       },
       packages=find_packages(exclude=['tests*']),
  
verification_info: {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -52,6 +52,8 @@\n if os.name == 'nt':\n     install_requires.append('pyreadline==2.0')\n \n+ver = sys.version_info[0]\n+\n setup(\n     name=PKG,\n     version=__version__,\n@@ -59,8 +61,11 @@\n     entry_points={\n         'console_scripts': [\n             'hy = hy.cmdline:hy_main',\n+            'hy%d = hy.cmdline:hy_main' % ver,\n             'hyc = hy.cmdline:hyc_main',\n+            'hyc%d = hy.cmdline:hyc_main' % ver,\n             'hy2py = hy.cmdline:hy2py_main',\n+            'hy2py%d = hy.cmdline:hy2py_main' % ver,\n         ]\n     },\n     packages=find_packages(exclude=['tests*']),\n", "issue": "Multiple implementations overwrite each others' entrypoint hooks\nIt's not uncommon to find Python 2 and Python 3 coexisting on the same system, and it's not unreasonable for the user to also want Hy for both Pythons. However, where Python handles this gracefully by providing separate executables (`python2` and `python3` alongside `python`, `pip2` and `pip3` alongside `pip` etc) Hy simply bulldozes an existing `hy`, `hyc` etc.\n\nSorry if this has already been reported; I tried to look for previous issues but nothing much came to mind when I was trying to play guess-the-keyword.\n\nMultiple implementations overwrite each others' entrypoint hooks\nIt's not uncommon to find Python 2 and Python 3 coexisting on the same system, and it's not unreasonable for the user to also want Hy for both Pythons. However, where Python handles this gracefully by providing separate executables (`python2` and `python3` alongside `python`, `pip2` and `pip3` alongside `pip` etc) Hy simply bulldozes an existing `hy`, `hyc` etc.\n\nSorry if this has already been reported; I tried to look for previous issues but nothing much came to mind when I was trying to play guess-the-keyword.\n\n", "before_files": [{"content": "#!/usr/bin/env python\n# Copyright (c) 2012, 2013 Paul Tagliamonte <paultag@debian.org>\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the \"Software\"),\n# to deal in the Software without restriction, including without limitation\n# the rights to use, copy, modify, merge, publish, distribute, sublicense,\n# and/or sell copies of the Software, and to permit persons to whom the\n# Software is furnished to do so, subject to the following conditions:\n#\n# The above copyright notice and this permission notice shall be included in\n# all copies or substantial portions of the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL\n# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n# DEALINGS IN THE SOFTWARE.\n\nimport os\nimport re\nimport sys\n\nfrom setuptools import find_packages, setup\n\nPKG = \"hy\"\nVERSIONFILE = os.path.join(PKG, \"version.py\")\nverstr = \"unknown\"\ntry:\n    verstrline = open(VERSIONFILE, \"rt\").read()\nexcept EnvironmentError:\n    pass  # Okay, there is no version file.\nelse:\n    VSRE = r\"^__version__ = ['\\\"]([^'\\\"]*)['\\\"]\"\n    mo = re.search(VSRE, verstrline, re.M)\n    if mo:\n        __version__ = mo.group(1)\n    else:\n        msg = \"if %s.py exists, it is required to be well-formed\" % VERSIONFILE\n        raise RuntimeError(msg)\n\nlong_description = \"\"\"Hy is a Python <--> Lisp layer. It helps\nmake things work nicer, and lets Python and the Hy lisp variant play\nnice together. \"\"\"\n\ninstall_requires = ['rply>=0.7.0', 'astor>=0.5', 'clint>=0.4']\nif sys.version_info[:2] < (2, 7):\n    install_requires.append('argparse>=1.2.1')\n    install_requires.append('importlib>=1.0.2')\nif os.name == 'nt':\n    install_requires.append('pyreadline==2.0')\n\nsetup(\n    name=PKG,\n    version=__version__,\n    install_requires=install_requires,\n    entry_points={\n        'console_scripts': [\n            'hy = hy.cmdline:hy_main',\n            'hyc = hy.cmdline:hyc_main',\n            'hy2py = hy.cmdline:hy2py_main',\n        ]\n    },\n    packages=find_packages(exclude=['tests*']),\n    package_data={\n        'hy.contrib': ['*.hy'],\n        'hy.core': ['*.hy'],\n    },\n    author=\"Paul Tagliamonte\",\n    author_email=\"tag@pault.ag\",\n    long_description=long_description,\n    description='Lisp and Python love each other.',\n    license=\"Expat\",\n    url=\"http://hylang.org/\",\n    platforms=['any'],\n    classifiers=[\n        \"Development Status :: 4 - Beta\",\n        \"Intended Audience :: Developers\",\n        \"License :: DFSG approved\",\n        \"License :: OSI Approved :: MIT License\",  # Really \"Expat\". Ugh.\n        \"Operating System :: OS Independent\",\n        \"Programming Language :: Lisp\",\n        \"Programming Language :: Python\",\n        \"Programming Language :: Python :: 2\",\n        \"Programming Language :: Python :: 2.6\",\n        \"Programming Language :: Python :: 2.7\",\n        \"Programming Language :: Python :: 3\",\n        \"Programming Language :: Python :: 3.3\",\n        \"Programming Language :: Python :: 3.4\",\n        \"Topic :: Software Development :: Code Generators\",\n        \"Topic :: Software Development :: Compilers\",\n        \"Topic :: Software Development :: Libraries\",\n    ]\n)\n", "path": "setup.py"}]}