We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[BUG] mars-* scripts not marked as executable
**Describe the bug**
Scripts in scripts/ dir not marked as executable when packed into wheels, thus when installed in venvs, they cannot be installed.

**To Reproduce**
To help us reproducing this bug, please provide information below:
1. Your Python version
  Python 3.7.1 installed with pyenv
2. The version of Mars you use
  0.1.0b1
3. Versions of crucial packages, such as numpy, scipy and protobuf
  not relevant
4. Full stack of the error.
  NA
5. Minimized code to reproduce the error.
  mars-scheduler ......


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `setup.py`
Content:
```
1 # Copyright 1999-2017 Alibaba Group Holding Ltd.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #      http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 
15 import os
16 import sys
17 from setuptools import setup, find_packages, Extension
18 
19 import numpy as np
20 from Cython.Build import cythonize
21 from Cython.Distutils import build_ext
22 
23 repo_root = os.path.dirname(os.path.abspath(__file__))
24 
25 try:
26     execfile
27 except NameError:
28     def execfile(fname, globs, locs=None):
29         locs = locs or globs
30         exec(compile(open(fname).read(), fname, "exec"), globs, locs)
31 
32 version_file_path = os.path.join(repo_root, 'mars', '_version.py')
33 version_ns = {'__file__': version_file_path}
34 execfile(version_file_path, version_ns)
35 
36 requirements = []
37 with open(os.path.join(repo_root, 'requirements.txt'), 'r') as f:
38     requirements.extend(f.read().splitlines())
39 
40 
41 extra_requirements = []
42 with open(os.path.join(repo_root, 'requirements-extra.txt'), 'r') as f:
43     extra_requirements.extend(f.read().splitlines())
44 
45 
46 long_description = None
47 if os.path.exists(os.path.join(repo_root, 'README.rst')):
48     with open(os.path.join(repo_root, 'README.rst')) as f:
49         long_description = f.read()
50 
51 
52 if os.path.exists(os.path.join(repo_root, '.git')):
53     git_info = version_ns['get_git_info']()
54     if git_info:
55         with open(os.path.join(repo_root, 'mars', '.git-branch'), 'w') as git_file:
56             git_file.write('%s %s' % git_info)
57 
58 cythonize_kw = dict(language_level=sys.version_info[0])
59 extension_kw = dict()
60 if 'CI_MODE' in os.environ:
61     extension_kw['define_macros'] = [('CYTHON_TRACE_NOGIL', '1'), ('CYTHON_TRACE', '1')]
62     cythonize_kw['compiler_directives'] = {'linetrace': True, 'binding': True}
63 
64 if 'MSC' in sys.version:
65     extra_compile_args = ['/Ot', '/I' + os.path.join(repo_root, 'misc')]
66     extension_kw['extra_compile_args'] = extra_compile_args
67 else:
68     extra_compile_args = ['-O3']
69     extension_kw['extra_compile_args'] = extra_compile_args
70 
71 extension_kw['include_dirs'] = [np.get_include()]
72 extensions = [
73     Extension('mars.graph', ['mars/graph.pyx'], **extension_kw),
74     Extension('mars.fuse', ['mars/fuse.pyx'], **extension_kw),
75     Extension('mars.utils_c', ['mars/utils_c.pyx'], **extension_kw),
76     Extension('mars.lib.gipc', ['mars/lib/gipc.pyx'], **extension_kw),
77     Extension('mars.actors.core', ['mars/actors/core.pyx'], **extension_kw),
78     Extension('mars.actors.distributor', ['mars/actors/distributor.pyx'], **extension_kw),
79     Extension('mars.actors.cluster', ['mars/actors/cluster.pyx'], **extension_kw),
80     Extension('mars.actors.pool.messages', ['mars/actors/pool/messages.pyx'], **extension_kw),
81     Extension('mars.actors.pool.utils', ['mars/actors/pool/utils.pyx'], **extension_kw),
82     Extension('mars.actors.pool.gevent_pool', ['mars/actors/pool/gevent_pool.pyx'], **extension_kw),
83     Extension('mars.serialize.core', ['mars/serialize/core.pyx'], **extension_kw),
84     Extension('mars.serialize.pbserializer', ['mars/serialize/pbserializer.pyx'], **extension_kw),
85     Extension('mars.serialize.jsonserializer', ['mars/serialize/jsonserializer.pyx'], **extension_kw),
86 ]
87 
88 
89 setup_options = dict(
90     name='pymars',
91     version=version_ns['__version__'],
92     description='MARS: a tensor-based unified framework for large-scale data computation.',
93     long_description=long_description,
94     author='Qin Xuye',
95     author_email='qin@qinxuye.me',
96     maintainer='Qin Xuye',
97     maintainer_email='qin@qinxuye.me',
98     url='http://github.com/mars-project/mars',
99     license='Apache License 2.0',
100     classifiers=[
101         'Operating System :: OS Independent',
102         'Programming Language :: Python',
103         'Programming Language :: Python :: 2',
104         'Programming Language :: Python :: 2.7',
105         'Programming Language :: Python :: 3',
106         'Programming Language :: Python :: 3.5',
107         'Programming Language :: Python :: 3.6',
108         'Programming Language :: Python :: 3.7',
109         'Programming Language :: Python :: Implementation :: CPython',
110         'Topic :: Software Development :: Libraries',
111     ],
112     packages=find_packages(exclude=('*.tests.*', '*.tests')),
113     include_package_data=True,
114     scripts=['scripts/mars-scheduler', 'scripts/mars-worker', 'scripts/mars-web'],
115     install_requires=requirements,
116     cmdclass={'build_ext': build_ext},
117     ext_modules=cythonize(extensions, **cythonize_kw),
118     extras_require={'distributed': extra_requirements}
119 )
120 setup(**setup_options)
121
```
--- 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/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -111,7 +111,11 @@
     ],
     packages=find_packages(exclude=('*.tests.*', '*.tests')),
     include_package_data=True,
-    scripts=['scripts/mars-scheduler', 'scripts/mars-worker', 'scripts/mars-web'],
+    entry_points={'console_scripts': [
+        'mars-scheduler = mars.scheduler.__main__:main',
+        'mars-worker = mars.worker.__main__:main',
+        'mars-web = mars.web.__main__:main',
+    ]},
     install_requires=requirements,
     cmdclass={'build_ext': build_ext},
     ext_modules=cythonize(extensions, **cythonize_kw),

{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -111,7 +111,11 @@\n     ],\n     packages=find_packages(exclude=('*.tests.*', '*.tests')),\n     include_package_data=True,\n-    scripts=['scripts/mars-scheduler', 'scripts/mars-worker', 'scripts/mars-web'],\n+    entry_points={'console_scripts': [\n+        'mars-scheduler = mars.scheduler.__main__:main',\n+        'mars-worker = mars.worker.__main__:main',\n+        'mars-web = mars.web.__main__:main',\n+    ]},\n     install_requires=requirements,\n     cmdclass={'build_ext': build_ext},\n     ext_modules=cythonize(extensions, **cythonize_kw),\n", "issue": "[BUG] mars-* scripts not marked as executable\n**Describe the bug**\r\nScripts in scripts/ dir not marked as executable when packed into wheels, thus when installed in venvs, they cannot be installed.\r\n\r\n**To Reproduce**\r\nTo help us reproducing this bug, please provide information below:\r\n1. Your Python version\r\n  Python 3.7.1 installed with pyenv\r\n2. The version of Mars you use\r\n  0.1.0b1\r\n3. Versions of crucial packages, such as numpy, scipy and protobuf\r\n  not relevant\r\n4. Full stack of the error.\r\n  NA\r\n5. Minimized code to reproduce the error.\r\n  mars-scheduler ......\r\n\n", "before_files": [{"content": "# Copyright 1999-2017 Alibaba Group Holding Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nimport os\nimport sys\nfrom setuptools import setup, find_packages, Extension\n\nimport numpy as np\nfrom Cython.Build import cythonize\nfrom Cython.Distutils import build_ext\n\nrepo_root = os.path.dirname(os.path.abspath(__file__))\n\ntry:\n    execfile\nexcept NameError:\n    def execfile(fname, globs, locs=None):\n        locs = locs or globs\n        exec(compile(open(fname).read(), fname, \"exec\"), globs, locs)\n\nversion_file_path = os.path.join(repo_root, 'mars', '_version.py')\nversion_ns = {'__file__': version_file_path}\nexecfile(version_file_path, version_ns)\n\nrequirements = []\nwith open(os.path.join(repo_root, 'requirements.txt'), 'r') as f:\n    requirements.extend(f.read().splitlines())\n\n\nextra_requirements = []\nwith open(os.path.join(repo_root, 'requirements-extra.txt'), 'r') as f:\n    extra_requirements.extend(f.read().splitlines())\n\n\nlong_description = None\nif os.path.exists(os.path.join(repo_root, 'README.rst')):\n    with open(os.path.join(repo_root, 'README.rst')) as f:\n        long_description = f.read()\n\n\nif os.path.exists(os.path.join(repo_root, '.git')):\n    git_info = version_ns['get_git_info']()\n    if git_info:\n        with open(os.path.join(repo_root, 'mars', '.git-branch'), 'w') as git_file:\n            git_file.write('%s %s' % git_info)\n\ncythonize_kw = dict(language_level=sys.version_info[0])\nextension_kw = dict()\nif 'CI_MODE' in os.environ:\n    extension_kw['define_macros'] = [('CYTHON_TRACE_NOGIL', '1'), ('CYTHON_TRACE', '1')]\n    cythonize_kw['compiler_directives'] = {'linetrace': True, 'binding': True}\n\nif 'MSC' in sys.version:\n    extra_compile_args = ['/Ot', '/I' + os.path.join(repo_root, 'misc')]\n    extension_kw['extra_compile_args'] = extra_compile_args\nelse:\n    extra_compile_args = ['-O3']\n    extension_kw['extra_compile_args'] = extra_compile_args\n\nextension_kw['include_dirs'] = [np.get_include()]\nextensions = [\n    Extension('mars.graph', ['mars/graph.pyx'], **extension_kw),\n    Extension('mars.fuse', ['mars/fuse.pyx'], **extension_kw),\n    Extension('mars.utils_c', ['mars/utils_c.pyx'], **extension_kw),\n    Extension('mars.lib.gipc', ['mars/lib/gipc.pyx'], **extension_kw),\n    Extension('mars.actors.core', ['mars/actors/core.pyx'], **extension_kw),\n    Extension('mars.actors.distributor', ['mars/actors/distributor.pyx'], **extension_kw),\n    Extension('mars.actors.cluster', ['mars/actors/cluster.pyx'], **extension_kw),\n    Extension('mars.actors.pool.messages', ['mars/actors/pool/messages.pyx'], **extension_kw),\n    Extension('mars.actors.pool.utils', ['mars/actors/pool/utils.pyx'], **extension_kw),\n    Extension('mars.actors.pool.gevent_pool', ['mars/actors/pool/gevent_pool.pyx'], **extension_kw),\n    Extension('mars.serialize.core', ['mars/serialize/core.pyx'], **extension_kw),\n    Extension('mars.serialize.pbserializer', ['mars/serialize/pbserializer.pyx'], **extension_kw),\n    Extension('mars.serialize.jsonserializer', ['mars/serialize/jsonserializer.pyx'], **extension_kw),\n]\n\n\nsetup_options = dict(\n    name='pymars',\n    version=version_ns['__version__'],\n    description='MARS: a tensor-based unified framework for large-scale data computation.',\n    long_description=long_description,\n    author='Qin Xuye',\n    author_email='qin@qinxuye.me',\n    maintainer='Qin Xuye',\n    maintainer_email='qin@qinxuye.me',\n    url='http://github.com/mars-project/mars',\n    license='Apache License 2.0',\n    classifiers=[\n        'Operating System :: OS Independent',\n        'Programming Language :: Python',\n        'Programming Language :: Python :: 2',\n        'Programming Language :: Python :: 2.7',\n        'Programming Language :: Python :: 3',\n        'Programming Language :: Python :: 3.5',\n        'Programming Language :: Python :: 3.6',\n        'Programming Language :: Python :: 3.7',\n        'Programming Language :: Python :: Implementation :: CPython',\n        'Topic :: Software Development :: Libraries',\n    ],\n    packages=find_packages(exclude=('*.tests.*', '*.tests')),\n    include_package_data=True,\n    scripts=['scripts/mars-scheduler', 'scripts/mars-worker', 'scripts/mars-web'],\n    install_requires=requirements,\n    cmdclass={'build_ext': build_ext},\n    ext_modules=cythonize(extensions, **cythonize_kw),\n    extras_require={'distributed': extra_requirements}\n)\nsetup(**setup_options)\n", "path": "setup.py"}], "after_files": [{"content": "# Copyright 1999-2017 Alibaba Group Holding Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#      http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nimport os\nimport sys\nfrom setuptools import setup, find_packages, Extension\n\nimport numpy as np\nfrom Cython.Build import cythonize\nfrom Cython.Distutils import build_ext\n\nrepo_root = os.path.dirname(os.path.abspath(__file__))\n\ntry:\n    execfile\nexcept NameError:\n    def execfile(fname, globs, locs=None):\n        locs = locs or globs\n        exec(compile(open(fname).read(), fname, \"exec\"), globs, locs)\n\nversion_file_path = os.path.join(repo_root, 'mars', '_version.py')\nversion_ns = {'__file__': version_file_path}\nexecfile(version_file_path, version_ns)\n\nrequirements = []\nwith open(os.path.join(repo_root, 'requirements.txt'), 'r') as f:\n    requirements.extend(f.read().splitlines())\n\n\nextra_requirements = []\nwith open(os.path.join(repo_root, 'requirements-extra.txt'), 'r') as f:\n    extra_requirements.extend(f.read().splitlines())\n\n\nlong_description = None\nif os.path.exists(os.path.join(repo_root, 'README.rst')):\n    with open(os.path.join(repo_root, 'README.rst')) as f:\n        long_description = f.read()\n\n\nif os.path.exists(os.path.join(repo_root, '.git')):\n    git_info = version_ns['get_git_info']()\n    if git_info:\n        with open(os.path.join(repo_root, 'mars', '.git-branch'), 'w') as git_file:\n            git_file.write('%s %s' % git_info)\n\ncythonize_kw = dict(language_level=sys.version_info[0])\nextension_kw = dict()\nif 'CI_MODE' in os.environ:\n    extension_kw['define_macros'] = [('CYTHON_TRACE_NOGIL', '1'), ('CYTHON_TRACE', '1')]\n    cythonize_kw['compiler_directives'] = {'linetrace': True, 'binding': True}\n\nif 'MSC' in sys.version:\n    extra_compile_args = ['/Ot', '/I' + os.path.join(repo_root, 'misc')]\n    extension_kw['extra_compile_args'] = extra_compile_args\nelse:\n    extra_compile_args = ['-O3']\n    extension_kw['extra_compile_args'] = extra_compile_args\n\nextension_kw['include_dirs'] = [np.get_include()]\nextensions = [\n    Extension('mars.graph', ['mars/graph.pyx'], **extension_kw),\n    Extension('mars.fuse', ['mars/fuse.pyx'], **extension_kw),\n    Extension('mars.utils_c', ['mars/utils_c.pyx'], **extension_kw),\n    Extension('mars.lib.gipc', ['mars/lib/gipc.pyx'], **extension_kw),\n    Extension('mars.actors.core', ['mars/actors/core.pyx'], **extension_kw),\n    Extension('mars.actors.distributor', ['mars/actors/distributor.pyx'], **extension_kw),\n    Extension('mars.actors.cluster', ['mars/actors/cluster.pyx'], **extension_kw),\n    Extension('mars.actors.pool.messages', ['mars/actors/pool/messages.pyx'], **extension_kw),\n    Extension('mars.actors.pool.utils', ['mars/actors/pool/utils.pyx'], **extension_kw),\n    Extension('mars.actors.pool.gevent_pool', ['mars/actors/pool/gevent_pool.pyx'], **extension_kw),\n    Extension('mars.serialize.core', ['mars/serialize/core.pyx'], **extension_kw),\n    Extension('mars.serialize.pbserializer', ['mars/serialize/pbserializer.pyx'], **extension_kw),\n    Extension('mars.serialize.jsonserializer', ['mars/serialize/jsonserializer.pyx'], **extension_kw),\n]\n\n\nsetup_options = dict(\n    name='pymars',\n    version=version_ns['__version__'],\n    description='MARS: a tensor-based unified framework for large-scale data computation.',\n    long_description=long_description,\n    author='Qin Xuye',\n    author_email='qin@qinxuye.me',\n    maintainer='Qin Xuye',\n    maintainer_email='qin@qinxuye.me',\n    url='http://github.com/mars-project/mars',\n    license='Apache License 2.0',\n    classifiers=[\n        'Operating System :: OS Independent',\n        'Programming Language :: Python',\n        'Programming Language :: Python :: 2',\n        'Programming Language :: Python :: 2.7',\n        'Programming Language :: Python :: 3',\n        'Programming Language :: Python :: 3.5',\n        'Programming Language :: Python :: 3.6',\n        'Programming Language :: Python :: 3.7',\n        'Programming Language :: Python :: Implementation :: CPython',\n        'Topic :: Software Development :: Libraries',\n    ],\n    packages=find_packages(exclude=('*.tests.*', '*.tests')),\n    include_package_data=True,\n    entry_points={'console_scripts': [\n        'mars-scheduler = mars.scheduler.__main__:main',\n        'mars-worker = mars.worker.__main__:main',\n        'mars-web = mars.web.__main__:main',\n    ]},\n    install_requires=requirements,\n    cmdclass={'build_ext': build_ext},\n    ext_modules=cythonize(extensions, **cythonize_kw),\n    extras_require={'distributed': extra_requirements}\n)\nsetup(**setup_options)\n", "path": "setup.py"}]}