We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
dashboard.py is not packaged in the Linux Ray wheels.
See the conversation in https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/ray-dev/M8wGAdEhkTw/QIbvbuoJBAAJ.

I think we can fix this just by putting `__init__.py` in the `ray/python/dashboard` directory, though we have to make sure that that includes the html and javascript files.

cc @virtualluke

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `python/setup.py`
Content:
```
1 from __future__ import absolute_import
2 from __future__ import division
3 from __future__ import print_function
4 
5 import os
6 import re
7 import shutil
8 import subprocess
9 import sys
10 
11 from setuptools import setup, find_packages, Distribution
12 import setuptools.command.build_ext as _build_ext
13 
14 # Ideally, we could include these files by putting them in a
15 # MANIFEST.in or using the package_data argument to setup, but the
16 # MANIFEST.in gets applied at the very beginning when setup.py runs
17 # before these files have been created, so we have to move the files
18 # manually.
19 
20 # NOTE: The lists below must be kept in sync with ray/CMakeLists.txt.
21 
22 ray_files = [
23     "ray/core/src/ray/thirdparty/redis/src/redis-server",
24     "ray/core/src/ray/gcs/redis_module/libray_redis_module.so",
25     "ray/core/src/plasma/plasma_store_server", "ray/_raylet.so",
26     "ray/core/src/ray/raylet/raylet_monitor", "ray/core/src/ray/raylet/raylet",
27     "ray/WebUI.ipynb"
28 ]
29 
30 # These are the directories where automatically generated Python flatbuffer
31 # bindings are created.
32 generated_python_directories = [
33     "ray/core/generated", "ray/core/generated/ray",
34     "ray/core/generated/ray/protocol"
35 ]
36 
37 optional_ray_files = []
38 
39 ray_ui_files = [
40     "ray/core/src/catapult_files/index.html",
41     "ray/core/src/catapult_files/trace_viewer_full.html"
42 ]
43 
44 ray_autoscaler_files = [
45     "ray/autoscaler/aws/example-full.yaml",
46     "ray/autoscaler/gcp/example-full.yaml",
47     "ray/autoscaler/local/example-full.yaml",
48 ]
49 
50 if "RAY_USE_NEW_GCS" in os.environ and os.environ["RAY_USE_NEW_GCS"] == "on":
51     ray_files += [
52         "ray/core/src/credis/build/src/libmember.so",
53         "ray/core/src/credis/build/src/libmaster.so",
54         "ray/core/src/credis/redis/src/redis-server"
55     ]
56 
57 # The UI files are mandatory if the INCLUDE_UI environment variable equals 1.
58 # Otherwise, they are optional.
59 if "INCLUDE_UI" in os.environ and os.environ["INCLUDE_UI"] == "1":
60     ray_files += ray_ui_files
61 else:
62     optional_ray_files += ray_ui_files
63 
64 optional_ray_files += ray_autoscaler_files
65 
66 extras = {
67     "rllib": [
68         "pyyaml", "gym[atari]", "opencv-python-headless", "lz4", "scipy"
69     ],
70     "debug": ["psutil", "setproctitle", "py-spy"],
71     "dashboard": ["psutil", "aiohttp"],
72 }
73 
74 
75 class build_ext(_build_ext.build_ext):
76     def run(self):
77         # Note: We are passing in sys.executable so that we use the same
78         # version of Python to build pyarrow inside the build.sh script. Note
79         # that certain flags will not be passed along such as --user or sudo.
80         # TODO(rkn): Fix this.
81         subprocess.check_call(["../build.sh", "-p", sys.executable])
82 
83         # We also need to install pyarrow along with Ray, so make sure that the
84         # relevant non-Python pyarrow files get copied.
85         pyarrow_files = []
86         for (root, dirs, filenames) in os.walk("./ray/pyarrow_files/pyarrow"):
87             for name in filenames:
88                 pyarrow_files.append(os.path.join(root, name))
89 
90         # Make sure the relevant files for modin get copied.
91         modin_files = []
92         for (root, dirs, filenames) in os.walk("./ray/modin"):
93             for name in filenames:
94                 modin_files.append(os.path.join(root, name))
95 
96         files_to_include = ray_files + pyarrow_files + modin_files
97 
98         # Copy over the autogenerated flatbuffer Python bindings.
99         for directory in generated_python_directories:
100             for filename in os.listdir(directory):
101                 if filename[-3:] == ".py":
102                     files_to_include.append(os.path.join(directory, filename))
103 
104         for filename in files_to_include:
105             self.move_file(filename)
106 
107         # Try to copy over the optional files.
108         for filename in optional_ray_files:
109             try:
110                 self.move_file(filename)
111             except Exception:
112                 print("Failed to copy optional file {}. This is ok."
113                       .format(filename))
114 
115     def move_file(self, filename):
116         # TODO(rkn): This feels very brittle. It may not handle all cases. See
117         # https://github.com/apache/arrow/blob/master/python/setup.py for an
118         # example.
119         source = filename
120         destination = os.path.join(self.build_lib, filename)
121         # Create the target directory if it doesn't already exist.
122         parent_directory = os.path.dirname(destination)
123         if not os.path.exists(parent_directory):
124             os.makedirs(parent_directory)
125         if not os.path.exists(destination):
126             print("Copying {} to {}.".format(source, destination))
127             shutil.copy(source, destination)
128 
129 
130 class BinaryDistribution(Distribution):
131     def has_ext_modules(self):
132         return True
133 
134 
135 def find_version(*filepath):
136     # Extract version information from filepath
137     here = os.path.abspath(os.path.dirname(__file__))
138     with open(os.path.join(here, *filepath)) as fp:
139         version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
140                                   fp.read(), re.M)
141         if version_match:
142             return version_match.group(1)
143         raise RuntimeError("Unable to find version string.")
144 
145 
146 requires = [
147     "numpy >= 1.10.4",
148     "filelock",
149     "funcsigs",
150     "click",
151     "colorama",
152     "pytest",
153     "pyyaml",
154     "redis",
155     "six >= 1.12.0",
156     # The typing module is required by modin.
157     "typing",
158     "flatbuffers",
159     "faulthandler;python_version<'3.3'",
160 ]
161 
162 setup(
163     name="ray",
164     version=find_version("ray", "__init__.py"),
165     author="Ray Team",
166     author_email="ray-dev@googlegroups.com",
167     description=("A system for parallel and distributed Python that unifies "
168                  "the ML ecosystem."),
169     long_description=open("../README.rst").read(),
170     url="https://github.com/ray-project/ray",
171     keywords=("ray distributed parallel machine-learning "
172               "reinforcement-learning deep-learning python"),
173     packages=find_packages(),
174     cmdclass={"build_ext": build_ext},
175     # The BinaryDistribution argument triggers build_ext.
176     distclass=BinaryDistribution,
177     install_requires=requires,
178     setup_requires=["cython >= 0.29"],
179     extras_require=extras,
180     entry_points={
181         "console_scripts": [
182             "ray=ray.scripts.scripts:main",
183             "rllib=ray.rllib.scripts:cli [rllib]"
184         ]
185     },
186     include_package_data=True,
187     zip_safe=False,
188     license="Apache 2.0")
189
```
--- 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/python/setup.py b/python/setup.py
--- a/python/setup.py
+++ b/python/setup.py
@@ -24,7 +24,9 @@
     "ray/core/src/ray/gcs/redis_module/libray_redis_module.so",
     "ray/core/src/plasma/plasma_store_server", "ray/_raylet.so",
     "ray/core/src/ray/raylet/raylet_monitor", "ray/core/src/ray/raylet/raylet",
-    "ray/WebUI.ipynb"
+    "ray/WebUI.ipynb", "ray/dashboard/dashboard.py",
+    "ray/dashboard/index.html", "ray/dashboard/res/main.css",
+    "ray/dashboard/res/main.js"
 ]
 
 # These are the directories where automatically generated Python flatbuffer

{"golden_diff": "diff --git a/python/setup.py b/python/setup.py\n--- a/python/setup.py\n+++ b/python/setup.py\n@@ -24,7 +24,9 @@\n     \"ray/core/src/ray/gcs/redis_module/libray_redis_module.so\",\n     \"ray/core/src/plasma/plasma_store_server\", \"ray/_raylet.so\",\n     \"ray/core/src/ray/raylet/raylet_monitor\", \"ray/core/src/ray/raylet/raylet\",\n-    \"ray/WebUI.ipynb\"\n+    \"ray/WebUI.ipynb\", \"ray/dashboard/dashboard.py\",\n+    \"ray/dashboard/index.html\", \"ray/dashboard/res/main.css\",\n+    \"ray/dashboard/res/main.js\"\n ]\n \n # These are the directories where automatically generated Python flatbuffer\n", "issue": "dashboard.py is not packaged in the Linux Ray wheels.\nSee the conversation in https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/ray-dev/M8wGAdEhkTw/QIbvbuoJBAAJ.\r\n\r\nI think we can fix this just by putting `__init__.py` in the `ray/python/dashboard` directory, though we have to make sure that that includes the html and javascript files.\r\n\r\ncc @virtualluke\n", "before_files": [{"content": "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport os\nimport re\nimport shutil\nimport subprocess\nimport sys\n\nfrom setuptools import setup, find_packages, Distribution\nimport setuptools.command.build_ext as _build_ext\n\n# Ideally, we could include these files by putting them in a\n# MANIFEST.in or using the package_data argument to setup, but the\n# MANIFEST.in gets applied at the very beginning when setup.py runs\n# before these files have been created, so we have to move the files\n# manually.\n\n# NOTE: The lists below must be kept in sync with ray/CMakeLists.txt.\n\nray_files = [\n    \"ray/core/src/ray/thirdparty/redis/src/redis-server\",\n    \"ray/core/src/ray/gcs/redis_module/libray_redis_module.so\",\n    \"ray/core/src/plasma/plasma_store_server\", \"ray/_raylet.so\",\n    \"ray/core/src/ray/raylet/raylet_monitor\", \"ray/core/src/ray/raylet/raylet\",\n    \"ray/WebUI.ipynb\"\n]\n\n# These are the directories where automatically generated Python flatbuffer\n# bindings are created.\ngenerated_python_directories = [\n    \"ray/core/generated\", \"ray/core/generated/ray\",\n    \"ray/core/generated/ray/protocol\"\n]\n\noptional_ray_files = []\n\nray_ui_files = [\n    \"ray/core/src/catapult_files/index.html\",\n    \"ray/core/src/catapult_files/trace_viewer_full.html\"\n]\n\nray_autoscaler_files = [\n    \"ray/autoscaler/aws/example-full.yaml\",\n    \"ray/autoscaler/gcp/example-full.yaml\",\n    \"ray/autoscaler/local/example-full.yaml\",\n]\n\nif \"RAY_USE_NEW_GCS\" in os.environ and os.environ[\"RAY_USE_NEW_GCS\"] == \"on\":\n    ray_files += [\n        \"ray/core/src/credis/build/src/libmember.so\",\n        \"ray/core/src/credis/build/src/libmaster.so\",\n        \"ray/core/src/credis/redis/src/redis-server\"\n    ]\n\n# The UI files are mandatory if the INCLUDE_UI environment variable equals 1.\n# Otherwise, they are optional.\nif \"INCLUDE_UI\" in os.environ and os.environ[\"INCLUDE_UI\"] == \"1\":\n    ray_files += ray_ui_files\nelse:\n    optional_ray_files += ray_ui_files\n\noptional_ray_files += ray_autoscaler_files\n\nextras = {\n    \"rllib\": [\n        \"pyyaml\", \"gym[atari]\", \"opencv-python-headless\", \"lz4\", \"scipy\"\n    ],\n    \"debug\": [\"psutil\", \"setproctitle\", \"py-spy\"],\n    \"dashboard\": [\"psutil\", \"aiohttp\"],\n}\n\n\nclass build_ext(_build_ext.build_ext):\n    def run(self):\n        # Note: We are passing in sys.executable so that we use the same\n        # version of Python to build pyarrow inside the build.sh script. Note\n        # that certain flags will not be passed along such as --user or sudo.\n        # TODO(rkn): Fix this.\n        subprocess.check_call([\"../build.sh\", \"-p\", sys.executable])\n\n        # We also need to install pyarrow along with Ray, so make sure that the\n        # relevant non-Python pyarrow files get copied.\n        pyarrow_files = []\n        for (root, dirs, filenames) in os.walk(\"./ray/pyarrow_files/pyarrow\"):\n            for name in filenames:\n                pyarrow_files.append(os.path.join(root, name))\n\n        # Make sure the relevant files for modin get copied.\n        modin_files = []\n        for (root, dirs, filenames) in os.walk(\"./ray/modin\"):\n            for name in filenames:\n                modin_files.append(os.path.join(root, name))\n\n        files_to_include = ray_files + pyarrow_files + modin_files\n\n        # Copy over the autogenerated flatbuffer Python bindings.\n        for directory in generated_python_directories:\n            for filename in os.listdir(directory):\n                if filename[-3:] == \".py\":\n                    files_to_include.append(os.path.join(directory, filename))\n\n        for filename in files_to_include:\n            self.move_file(filename)\n\n        # Try to copy over the optional files.\n        for filename in optional_ray_files:\n            try:\n                self.move_file(filename)\n            except Exception:\n                print(\"Failed to copy optional file {}. This is ok.\"\n                      .format(filename))\n\n    def move_file(self, filename):\n        # TODO(rkn): This feels very brittle. It may not handle all cases. See\n        # https://github.com/apache/arrow/blob/master/python/setup.py for an\n        # example.\n        source = filename\n        destination = os.path.join(self.build_lib, filename)\n        # Create the target directory if it doesn't already exist.\n        parent_directory = os.path.dirname(destination)\n        if not os.path.exists(parent_directory):\n            os.makedirs(parent_directory)\n        if not os.path.exists(destination):\n            print(\"Copying {} to {}.\".format(source, destination))\n            shutil.copy(source, destination)\n\n\nclass BinaryDistribution(Distribution):\n    def has_ext_modules(self):\n        return True\n\n\ndef find_version(*filepath):\n    # Extract version information from filepath\n    here = os.path.abspath(os.path.dirname(__file__))\n    with open(os.path.join(here, *filepath)) as fp:\n        version_match = re.search(r\"^__version__ = ['\\\"]([^'\\\"]*)['\\\"]\",\n                                  fp.read(), re.M)\n        if version_match:\n            return version_match.group(1)\n        raise RuntimeError(\"Unable to find version string.\")\n\n\nrequires = [\n    \"numpy >= 1.10.4\",\n    \"filelock\",\n    \"funcsigs\",\n    \"click\",\n    \"colorama\",\n    \"pytest\",\n    \"pyyaml\",\n    \"redis\",\n    \"six >= 1.12.0\",\n    # The typing module is required by modin.\n    \"typing\",\n    \"flatbuffers\",\n    \"faulthandler;python_version<'3.3'\",\n]\n\nsetup(\n    name=\"ray\",\n    version=find_version(\"ray\", \"__init__.py\"),\n    author=\"Ray Team\",\n    author_email=\"ray-dev@googlegroups.com\",\n    description=(\"A system for parallel and distributed Python that unifies \"\n                 \"the ML ecosystem.\"),\n    long_description=open(\"../README.rst\").read(),\n    url=\"https://github.com/ray-project/ray\",\n    keywords=(\"ray distributed parallel machine-learning \"\n              \"reinforcement-learning deep-learning python\"),\n    packages=find_packages(),\n    cmdclass={\"build_ext\": build_ext},\n    # The BinaryDistribution argument triggers build_ext.\n    distclass=BinaryDistribution,\n    install_requires=requires,\n    setup_requires=[\"cython >= 0.29\"],\n    extras_require=extras,\n    entry_points={\n        \"console_scripts\": [\n            \"ray=ray.scripts.scripts:main\",\n            \"rllib=ray.rllib.scripts:cli [rllib]\"\n        ]\n    },\n    include_package_data=True,\n    zip_safe=False,\n    license=\"Apache 2.0\")\n", "path": "python/setup.py"}], "after_files": [{"content": "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport os\nimport re\nimport shutil\nimport subprocess\nimport sys\n\nfrom setuptools import setup, find_packages, Distribution\nimport setuptools.command.build_ext as _build_ext\n\n# Ideally, we could include these files by putting them in a\n# MANIFEST.in or using the package_data argument to setup, but the\n# MANIFEST.in gets applied at the very beginning when setup.py runs\n# before these files have been created, so we have to move the files\n# manually.\n\n# NOTE: The lists below must be kept in sync with ray/CMakeLists.txt.\n\nray_files = [\n    \"ray/core/src/ray/thirdparty/redis/src/redis-server\",\n    \"ray/core/src/ray/gcs/redis_module/libray_redis_module.so\",\n    \"ray/core/src/plasma/plasma_store_server\", \"ray/_raylet.so\",\n    \"ray/core/src/ray/raylet/raylet_monitor\", \"ray/core/src/ray/raylet/raylet\",\n    \"ray/WebUI.ipynb\", \"ray/dashboard/dashboard.py\",\n    \"ray/dashboard/index.html\", \"ray/dashboard/res/main.css\",\n    \"ray/dashboard/res/main.js\"\n]\n\n# These are the directories where automatically generated Python flatbuffer\n# bindings are created.\ngenerated_python_directories = [\n    \"ray/core/generated\", \"ray/core/generated/ray\",\n    \"ray/core/generated/ray/protocol\"\n]\n\noptional_ray_files = []\n\nray_ui_files = [\n    \"ray/core/src/catapult_files/index.html\",\n    \"ray/core/src/catapult_files/trace_viewer_full.html\"\n]\n\nray_autoscaler_files = [\n    \"ray/autoscaler/aws/example-full.yaml\",\n    \"ray/autoscaler/gcp/example-full.yaml\",\n    \"ray/autoscaler/local/example-full.yaml\",\n]\n\nif \"RAY_USE_NEW_GCS\" in os.environ and os.environ[\"RAY_USE_NEW_GCS\"] == \"on\":\n    ray_files += [\n        \"ray/core/src/credis/build/src/libmember.so\",\n        \"ray/core/src/credis/build/src/libmaster.so\",\n        \"ray/core/src/credis/redis/src/redis-server\"\n    ]\n\n# The UI files are mandatory if the INCLUDE_UI environment variable equals 1.\n# Otherwise, they are optional.\nif \"INCLUDE_UI\" in os.environ and os.environ[\"INCLUDE_UI\"] == \"1\":\n    ray_files += ray_ui_files\nelse:\n    optional_ray_files += ray_ui_files\n\noptional_ray_files += ray_autoscaler_files\n\nextras = {\n    \"rllib\": [\n        \"pyyaml\", \"gym[atari]\", \"opencv-python-headless\", \"lz4\", \"scipy\"\n    ],\n    \"debug\": [\"psutil\", \"setproctitle\", \"py-spy\"],\n    \"dashboard\": [\"psutil\", \"aiohttp\"],\n}\n\n\nclass build_ext(_build_ext.build_ext):\n    def run(self):\n        # Note: We are passing in sys.executable so that we use the same\n        # version of Python to build pyarrow inside the build.sh script. Note\n        # that certain flags will not be passed along such as --user or sudo.\n        # TODO(rkn): Fix this.\n        subprocess.check_call([\"../build.sh\", \"-p\", sys.executable])\n\n        # We also need to install pyarrow along with Ray, so make sure that the\n        # relevant non-Python pyarrow files get copied.\n        pyarrow_files = []\n        for (root, dirs, filenames) in os.walk(\"./ray/pyarrow_files/pyarrow\"):\n            for name in filenames:\n                pyarrow_files.append(os.path.join(root, name))\n\n        # Make sure the relevant files for modin get copied.\n        modin_files = []\n        for (root, dirs, filenames) in os.walk(\"./ray/modin\"):\n            for name in filenames:\n                modin_files.append(os.path.join(root, name))\n\n        files_to_include = ray_files + pyarrow_files + modin_files\n\n        # Copy over the autogenerated flatbuffer Python bindings.\n        for directory in generated_python_directories:\n            for filename in os.listdir(directory):\n                if filename[-3:] == \".py\":\n                    files_to_include.append(os.path.join(directory, filename))\n\n        for filename in files_to_include:\n            self.move_file(filename)\n\n        # Try to copy over the optional files.\n        for filename in optional_ray_files:\n            try:\n                self.move_file(filename)\n            except Exception:\n                print(\"Failed to copy optional file {}. This is ok.\"\n                      .format(filename))\n\n    def move_file(self, filename):\n        # TODO(rkn): This feels very brittle. It may not handle all cases. See\n        # https://github.com/apache/arrow/blob/master/python/setup.py for an\n        # example.\n        source = filename\n        destination = os.path.join(self.build_lib, filename)\n        # Create the target directory if it doesn't already exist.\n        parent_directory = os.path.dirname(destination)\n        if not os.path.exists(parent_directory):\n            os.makedirs(parent_directory)\n        if not os.path.exists(destination):\n            print(\"Copying {} to {}.\".format(source, destination))\n            shutil.copy(source, destination)\n\n\nclass BinaryDistribution(Distribution):\n    def has_ext_modules(self):\n        return True\n\n\ndef find_version(*filepath):\n    # Extract version information from filepath\n    here = os.path.abspath(os.path.dirname(__file__))\n    with open(os.path.join(here, *filepath)) as fp:\n        version_match = re.search(r\"^__version__ = ['\\\"]([^'\\\"]*)['\\\"]\",\n                                  fp.read(), re.M)\n        if version_match:\n            return version_match.group(1)\n        raise RuntimeError(\"Unable to find version string.\")\n\n\nrequires = [\n    \"numpy >= 1.10.4\",\n    \"filelock\",\n    \"funcsigs\",\n    \"click\",\n    \"colorama\",\n    \"pytest\",\n    \"pyyaml\",\n    \"redis\",\n    \"six >= 1.12.0\",\n    # The typing module is required by modin.\n    \"typing\",\n    \"flatbuffers\",\n    \"faulthandler;python_version<'3.3'\",\n]\n\nsetup(\n    name=\"ray\",\n    version=find_version(\"ray\", \"__init__.py\"),\n    author=\"Ray Team\",\n    author_email=\"ray-dev@googlegroups.com\",\n    description=(\"A system for parallel and distributed Python that unifies \"\n                 \"the ML ecosystem.\"),\n    long_description=open(\"../README.rst\").read(),\n    url=\"https://github.com/ray-project/ray\",\n    keywords=(\"ray distributed parallel machine-learning \"\n              \"reinforcement-learning deep-learning python\"),\n    packages=find_packages(),\n    cmdclass={\"build_ext\": build_ext},\n    # The BinaryDistribution argument triggers build_ext.\n    distclass=BinaryDistribution,\n    install_requires=requires,\n    setup_requires=[\"cython >= 0.29\"],\n    extras_require=extras,\n    entry_points={\n        \"console_scripts\": [\n            \"ray=ray.scripts.scripts:main\",\n            \"rllib=ray.rllib.scripts:cli [rllib]\"\n        ]\n    },\n    include_package_data=True,\n    zip_safe=False,\n    license=\"Apache 2.0\")\n", "path": "python/setup.py"}]}