We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN 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


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `lib/setup.py`
Content:
```
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 FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

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"""

{"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"}], "after_files": [{"content": "import os\nimport setuptools\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\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"}]}