prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Watchdog error on install (Mac)
  I've tried to install it in a MAC using PIP and PIP3 and I get the same error:
  
  Command "/usr/local/opt/python/bin/python3.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/0s/rkvsfhzn2930_3902mpks9lm0000gn/T/pip-install-3cscl6kq/watchdog/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/0s/rkvsfhzn2930_3902mpks9lm0000gn/T/pip-record-qr49cvd0/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/0s/rkvsfhzn2930_3902mpks9lm0000gn/T/pip-install-3cscl6kq/watchdog/
  
  I'm using: 
  macOS Mojave 10.14.5
  
  
  </issue>
  <code>
  [start of lib/setup.py]
  1 import os
  2 import platform
  3 import setuptools
  4 import subprocess
  5 import sys
  6 
  7 from setuptools.command.install import install
  8 
  9 try:
  10     from pipenv.project import Project
  11     from pipenv.utils import convert_deps_to_pip
  12 except:
  13     exit_msg = (
  14         "pipenv is required to package Streamlit. Please install pipenv and try again"
  15     )
  16     sys.exit(exit_msg)
  17 
  18 VERSION = "0.72.0"  # PEP-440
  19 
  20 NAME = "streamlit"
  21 
  22 DESCRIPTION = "The fastest way to build data apps in Python"
  23 
  24 LONG_DESCRIPTION = (
  25     "Streamlit's open-source app framework is the easiest way "
  26     "for data scientists and machine learning engineers to "
  27     "create beautiful, performant apps in only a few hours! "
  28     "All in pure Python. All for free."
  29 )
  30 
  31 pipfile = Project(chdir=False).parsed_pipfile
  32 
  33 packages = pipfile["packages"].copy()
  34 requirements = convert_deps_to_pip(packages, r=False)
  35 
  36 # Check whether xcode tools are available before making watchdog a
  37 # dependency (only if the current system is a Mac).
  38 if platform.system() == "Darwin":
  39     has_xcode = subprocess.call(["xcode-select", "--version"], shell=False) == 0
  40     has_gcc = subprocess.call(["gcc", "--version"], shell=False) == 0
  41 
  42     if not (has_xcode and has_gcc):
  43         try:
  44             requirements.remove("watchdog")
  45         except ValueError:
  46             pass
  47 
  48 
  49 class VerifyVersionCommand(install):
  50     """Custom command to verify that the git tag matches our version"""
  51 
  52     description = "verify that the git tag matches our version"
  53 
  54     def run(self):
  55         tag = os.getenv("CIRCLE_TAG")
  56 
  57         if tag != VERSION:
  58             info = "Git tag: {0} does not match the version of this app: {1}".format(
  59                 tag, VERSION
  60             )
  61             sys.exit(info)
  62 
  63 
  64 setuptools.setup(
  65     name=NAME,
  66     version=VERSION,
  67     description=DESCRIPTION,
  68     long_description=LONG_DESCRIPTION,
  69     url="https://streamlit.io",
  70     author="Streamlit Inc",
  71     author_email="hello@streamlit.io",
  72     python_requires=">=3.6",
  73     license="Apache 2",
  74     packages=setuptools.find_packages(exclude=["tests", "tests.*"]),
  75     # Requirements
  76     install_requires=requirements,
  77     zip_safe=False,  # install source files not egg
  78     include_package_data=True,  # copy html and friends
  79     entry_points={"console_scripts": ["streamlit = streamlit.cli:main"]},
  80     # For Windows so that streamlit * commands work ie.
  81     # - streamlit version
  82     # - streamlit hello
  83     scripts=["bin/streamlit.cmd"],
  84     cmdclass={
  85         "verify": VerifyVersionCommand,
  86     },
  87 )
  88
  [end of lib/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/lib/setup.py b/lib/setup.py
  --- a/lib/setup.py
  +++ b/lib/setup.py
  @@ -1,7 +1,5 @@
   import os
  -import platform
   import setuptools
  -import subprocess
   import sys
   
   from setuptools.command.install import install
  @@ -33,18 +31,6 @@
   packages = pipfile["packages"].copy()
   requirements = convert_deps_to_pip(packages, r=False)
   
  -# Check whether xcode tools are available before making watchdog a
  -# dependency (only if the current system is a Mac).
  -if platform.system() == "Darwin":
  -    has_xcode = subprocess.call(["xcode-select", "--version"], shell=False) == 0
  -    has_gcc = subprocess.call(["gcc", "--version"], shell=False) == 0
  -
  -    if not (has_xcode and has_gcc):
  -        try:
  -            requirements.remove("watchdog")
  -        except ValueError:
  -            pass
  -
   
   class VerifyVersionCommand(install):
       """Custom command to verify that the git tag matches our version"""
  
verification_info: {"golden_diff": "diff --git a/lib/setup.py b/lib/setup.py\n--- a/lib/setup.py\n+++ b/lib/setup.py\n@@ -1,7 +1,5 @@\n import os\n-import platform\n import setuptools\n-import subprocess\n import sys\n \n from setuptools.command.install import install\n@@ -33,18 +31,6 @@\n packages = pipfile[\"packages\"].copy()\n requirements = convert_deps_to_pip(packages, r=False)\n \n-# Check whether xcode tools are available before making watchdog a\n-# dependency (only if the current system is a Mac).\n-if platform.system() == \"Darwin\":\n-    has_xcode = subprocess.call([\"xcode-select\", \"--version\"], shell=False) == 0\n-    has_gcc = subprocess.call([\"gcc\", \"--version\"], shell=False) == 0\n-\n-    if not (has_xcode and has_gcc):\n-        try:\n-            requirements.remove(\"watchdog\")\n-        except ValueError:\n-            pass\n-\n \n class VerifyVersionCommand(install):\n     \"\"\"Custom command to verify that the git tag matches our version\"\"\"\n", "issue": "Watchdog error on install (Mac)\nI've tried to install it in a MAC using PIP and PIP3 and I get the same error:\r\n\r\nCommand \"/usr/local/opt/python/bin/python3.7 -u -c \"import setuptools, tokenize;__file__='/private/var/folders/0s/rkvsfhzn2930_3902mpks9lm0000gn/T/pip-install-3cscl6kq/watchdog/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\\r\\n', '\\n');f.close();exec(compile(code, __file__, 'exec'))\" install --record /private/var/folders/0s/rkvsfhzn2930_3902mpks9lm0000gn/T/pip-record-qr49cvd0/install-record.txt --single-version-externally-managed --compile\" failed with error code 1 in /private/var/folders/0s/rkvsfhzn2930_3902mpks9lm0000gn/T/pip-install-3cscl6kq/watchdog/\r\n\r\nI'm using: \r\nmacOS Mojave 10.14.5\r\n\n", "before_files": [{"content": "import os\nimport platform\nimport setuptools\nimport subprocess\nimport sys\n\nfrom setuptools.command.install import install\n\ntry:\n    from pipenv.project import Project\n    from pipenv.utils import convert_deps_to_pip\nexcept:\n    exit_msg = (\n        \"pipenv is required to package Streamlit. Please install pipenv and try again\"\n    )\n    sys.exit(exit_msg)\n\nVERSION = \"0.72.0\"  # PEP-440\n\nNAME = \"streamlit\"\n\nDESCRIPTION = \"The fastest way to build data apps in Python\"\n\nLONG_DESCRIPTION = (\n    \"Streamlit's open-source app framework is the easiest way \"\n    \"for data scientists and machine learning engineers to \"\n    \"create beautiful, performant apps in only a few hours! \"\n    \"All in pure Python. All for free.\"\n)\n\npipfile = Project(chdir=False).parsed_pipfile\n\npackages = pipfile[\"packages\"].copy()\nrequirements = convert_deps_to_pip(packages, r=False)\n\n# Check whether xcode tools are available before making watchdog a\n# dependency (only if the current system is a Mac).\nif platform.system() == \"Darwin\":\n    has_xcode = subprocess.call([\"xcode-select\", \"--version\"], shell=False) == 0\n    has_gcc = subprocess.call([\"gcc\", \"--version\"], shell=False) == 0\n\n    if not (has_xcode and has_gcc):\n        try:\n            requirements.remove(\"watchdog\")\n        except ValueError:\n            pass\n\n\nclass VerifyVersionCommand(install):\n    \"\"\"Custom command to verify that the git tag matches our version\"\"\"\n\n    description = \"verify that the git tag matches our version\"\n\n    def run(self):\n        tag = os.getenv(\"CIRCLE_TAG\")\n\n        if tag != VERSION:\n            info = \"Git tag: {0} does not match the version of this app: {1}\".format(\n                tag, VERSION\n            )\n            sys.exit(info)\n\n\nsetuptools.setup(\n    name=NAME,\n    version=VERSION,\n    description=DESCRIPTION,\n    long_description=LONG_DESCRIPTION,\n    url=\"https://streamlit.io\",\n    author=\"Streamlit Inc\",\n    author_email=\"hello@streamlit.io\",\n    python_requires=\">=3.6\",\n    license=\"Apache 2\",\n    packages=setuptools.find_packages(exclude=[\"tests\", \"tests.*\"]),\n    # Requirements\n    install_requires=requirements,\n    zip_safe=False,  # install source files not egg\n    include_package_data=True,  # copy html and friends\n    entry_points={\"console_scripts\": [\"streamlit = streamlit.cli:main\"]},\n    # For Windows so that streamlit * commands work ie.\n    # - streamlit version\n    # - streamlit hello\n    scripts=[\"bin/streamlit.cmd\"],\n    cmdclass={\n        \"verify\": VerifyVersionCommand,\n    },\n)\n", "path": "lib/setup.py"}]}