We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Wrong install location for docs
From `setup.py`:
```
setup(
   [...]
    package_data={
        'vispy': [op.join('io', '_data', '*'),
                  op.join('html', 'static', 'js', '*'),
                  op.join('app', 'tests', 'qt-designer.ui'),
                  op.join('..', 'doc', '*'),
                  ],
```
This line `op.join('..', 'doc', '*')` is wrong for a system-wide install. It leads to the documentation being install under `dist-packages` or `site-packages`, which is definitely non-standard. IMO, the best would be to just not install the docs yourself, and let the package build system (conda or Debian) handle it.

--- 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 # -*- coding: utf-8 -*-
2 # Copyright (c) Vispy Development Team. All Rights Reserved.
3 # Distributed under the (new) BSD License. See LICENSE.txt for more info.
4 
5 """ Vispy setup script.
6 
7 Steps to do a new release:
8 
9 Preparations:
10   * Test on Windows, Linux, Mac
11   * Make release notes
12   * Update API documentation and other docs that need updating.
13   * Install 'twine' package for uploading to PyPI
14 
15 Define the version:
16   * update __version__ in __init__.py
17   * tag the tip changeset as version x.x.x; `git tag -a 'vX.Y.Z'`
18 
19 Test installation:
20   * clear the build and dist dir (if they exist)
21   * python setup.py sdist
22   * twine register --repository-url https://test.pypi.org/legacy/ dist/*
23   * twine upload --repository-url https://test.pypi.org/legacy/ dist/*
24   * pip install -i https://testpypi.python.org/pypi vispy
25 
26 Generate and upload package
27   * python setup.py sdist
28   * twine register dist/*
29   * twine upload dist/*
30 
31 Announcing:
32   * It can be worth waiting a day for eager users to report critical bugs
33   * Announce in scipy-user, vispy mailing list, G+
34 
35 """
36 
37 import os
38 from os import path as op
39 from warnings import warn
40 
41 try:
42     # use setuptools namespace, allows for "develop"
43     import setuptools  # noqa, analysis:ignore
44 except ImportError:
45     warn("unable to load setuptools. 'setup.py develop' will not work")
46     pass  # it's not essential for installation
47 from distutils.core import setup
48 
49 name = 'vispy'
50 description = 'Interactive visualization in Python'
51 
52 
53 # Get version and docstring
54 __version__ = None
55 __doc__ = ''
56 docStatus = 0  # Not started, in progress, done
57 initFile = os.path.join(os.path.dirname(__file__), 'vispy', '__init__.py')
58 for line in open(initFile).readlines():
59     if (line.startswith('version_info') or line.startswith('__version__')):
60         exec(line.strip())
61     elif line.startswith('"""'):
62         if docStatus == 0:
63             docStatus = 1
64             line = line.lstrip('"')
65         elif docStatus == 1:
66             docStatus = 2
67     if docStatus == 1:
68         __doc__ += line
69 
70 
71 def package_tree(pkgroot):
72     path = os.path.dirname(__file__)
73     subdirs = [os.path.relpath(i[0], path).replace(os.path.sep, '.')
74                for i in os.walk(os.path.join(path, pkgroot))
75                if '__init__.py' in i[2]]
76     return subdirs
77 
78 
79 setup(
80     name=name,
81     version=__version__,
82     author='Vispy contributors',
83     author_email='vispy@googlegroups.com',
84     license='(new) BSD',
85     url='http://vispy.org',
86     download_url='https://pypi.python.org/pypi/vispy',
87     keywords="visualization OpenGl ES medical imaging 3D plotting "
88              "numpy bigdata",
89     description=description,
90     long_description=__doc__,
91     platforms='any',
92     provides=['vispy'],
93     install_requires=['numpy'],
94     extras_require={
95         'ipython-static': ['ipython'],
96         'ipython-vnc': ['ipython>=2'],
97         'ipython-webgl': ['ipython>=2', 'tornado'],
98         'pyglet': ['pyglet>=1.2'],
99         # 'pyqt4': [],  # Why is this on PyPI, but without downloads?
100         # 'pyqt5': [],  # Ditto.
101         'pyside': ['PySide'],
102         'sdl2': ['PySDL2'],
103         'wx': ['wxPython'],
104     },
105     packages=package_tree('vispy'),
106     package_dir={
107         'vispy': 'vispy'},
108     package_data={
109         'vispy': [op.join('io', '_data', '*'),
110                   op.join('html', 'static', 'js', '*'),
111                   op.join('app', 'tests', 'qt-designer.ui'),
112                   op.join('..', 'doc', '*'),
113                   ],
114 
115         'vispy.glsl': ['*.vert','*.frag', "*.glsl"],
116         'vispy.glsl.antialias': ['*.vert','*.frag', "*.glsl"],
117         'vispy.glsl.arrowheads': ['*.vert','*.frag', "*.glsl"],
118         'vispy.glsl.arrows': ['*.vert','*.frag', "*.glsl"],
119         'vispy.glsl.collections': ['*.vert','*.frag', "*.glsl"],
120         'vispy.glsl.colormaps': ['*.vert','*.frag', "*.glsl"],
121         'vispy.glsl.lines': ['*.vert','*.frag', "*.glsl"],
122         'vispy.glsl.markers': ['*.vert','*.frag', "*.glsl"],
123         'vispy.glsl.math': ['*.vert','*.frag', "*.glsl"],
124         'vispy.glsl.misc': ['*.vert','*.frag', "*.glsl"],
125         'vispy.glsl.transforms': ['*.vert','*.frag', "*.glsl"],
126 
127                   },
128     zip_safe=False,
129     classifiers=[
130         'Development Status :: 3 - Alpha',
131         'Intended Audience :: Science/Research',
132         'Intended Audience :: Education',
133         'Intended Audience :: Developers',
134         'Topic :: Scientific/Engineering :: Visualization',
135         'License :: OSI Approved :: BSD License',
136         'Operating System :: MacOS :: MacOS X',
137         'Operating System :: Microsoft :: Windows',
138         'Operating System :: POSIX',
139         'Programming Language :: Python',
140         'Programming Language :: Python :: 2.7',
141         'Programming Language :: Python :: 3.3',
142         'Programming Language :: Python :: 3.4',
143         'Programming Language :: Python :: 3.5',
144         'Programming Language :: Python :: 3.6',
145         'Framework :: IPython'
146     ],
147 )
148
```
--- 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
@@ -109,7 +109,6 @@
         'vispy': [op.join('io', '_data', '*'),
                   op.join('html', 'static', 'js', '*'),
                   op.join('app', 'tests', 'qt-designer.ui'),
-                  op.join('..', 'doc', '*'),
                   ],
 
         'vispy.glsl': ['*.vert','*.frag', "*.glsl"],

{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -109,7 +109,6 @@\n         'vispy': [op.join('io', '_data', '*'),\n                   op.join('html', 'static', 'js', '*'),\n                   op.join('app', 'tests', 'qt-designer.ui'),\n-                  op.join('..', 'doc', '*'),\n                   ],\n \n         'vispy.glsl': ['*.vert','*.frag', \"*.glsl\"],\n", "issue": "Wrong install location for docs\nFrom `setup.py`:\r\n```\r\nsetup(\r\n   [...]\r\n    package_data={\r\n        'vispy': [op.join('io', '_data', '*'),\r\n                  op.join('html', 'static', 'js', '*'),\r\n                  op.join('app', 'tests', 'qt-designer.ui'),\r\n                  op.join('..', 'doc', '*'),\r\n                  ],\r\n```\r\nThis line `op.join('..', 'doc', '*')` is wrong for a system-wide install. It leads to the documentation being install under `dist-packages` or `site-packages`, which is definitely non-standard. IMO, the best would be to just not install the docs yourself, and let the package build system (conda or Debian) handle it.\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\n# Copyright (c) Vispy Development Team. All Rights Reserved.\n# Distributed under the (new) BSD License. See LICENSE.txt for more info.\n\n\"\"\" Vispy setup script.\n\nSteps to do a new release:\n\nPreparations:\n  * Test on Windows, Linux, Mac\n  * Make release notes\n  * Update API documentation and other docs that need updating.\n  * Install 'twine' package for uploading to PyPI\n\nDefine the version:\n  * update __version__ in __init__.py\n  * tag the tip changeset as version x.x.x; `git tag -a 'vX.Y.Z'`\n\nTest installation:\n  * clear the build and dist dir (if they exist)\n  * python setup.py sdist\n  * twine register --repository-url https://test.pypi.org/legacy/ dist/*\n  * twine upload --repository-url https://test.pypi.org/legacy/ dist/*\n  * pip install -i https://testpypi.python.org/pypi vispy\n\nGenerate and upload package\n  * python setup.py sdist\n  * twine register dist/*\n  * twine upload dist/*\n\nAnnouncing:\n  * It can be worth waiting a day for eager users to report critical bugs\n  * Announce in scipy-user, vispy mailing list, G+\n\n\"\"\"\n\nimport os\nfrom os import path as op\nfrom warnings import warn\n\ntry:\n    # use setuptools namespace, allows for \"develop\"\n    import setuptools  # noqa, analysis:ignore\nexcept ImportError:\n    warn(\"unable to load setuptools. 'setup.py develop' will not work\")\n    pass  # it's not essential for installation\nfrom distutils.core import setup\n\nname = 'vispy'\ndescription = 'Interactive visualization in Python'\n\n\n# Get version and docstring\n__version__ = None\n__doc__ = ''\ndocStatus = 0  # Not started, in progress, done\ninitFile = os.path.join(os.path.dirname(__file__), 'vispy', '__init__.py')\nfor line in open(initFile).readlines():\n    if (line.startswith('version_info') or line.startswith('__version__')):\n        exec(line.strip())\n    elif line.startswith('\"\"\"'):\n        if docStatus == 0:\n            docStatus = 1\n            line = line.lstrip('\"')\n        elif docStatus == 1:\n            docStatus = 2\n    if docStatus == 1:\n        __doc__ += line\n\n\ndef package_tree(pkgroot):\n    path = os.path.dirname(__file__)\n    subdirs = [os.path.relpath(i[0], path).replace(os.path.sep, '.')\n               for i in os.walk(os.path.join(path, pkgroot))\n               if '__init__.py' in i[2]]\n    return subdirs\n\n\nsetup(\n    name=name,\n    version=__version__,\n    author='Vispy contributors',\n    author_email='vispy@googlegroups.com',\n    license='(new) BSD',\n    url='http://vispy.org',\n    download_url='https://pypi.python.org/pypi/vispy',\n    keywords=\"visualization OpenGl ES medical imaging 3D plotting \"\n             \"numpy bigdata\",\n    description=description,\n    long_description=__doc__,\n    platforms='any',\n    provides=['vispy'],\n    install_requires=['numpy'],\n    extras_require={\n        'ipython-static': ['ipython'],\n        'ipython-vnc': ['ipython>=2'],\n        'ipython-webgl': ['ipython>=2', 'tornado'],\n        'pyglet': ['pyglet>=1.2'],\n        # 'pyqt4': [],  # Why is this on PyPI, but without downloads?\n        # 'pyqt5': [],  # Ditto.\n        'pyside': ['PySide'],\n        'sdl2': ['PySDL2'],\n        'wx': ['wxPython'],\n    },\n    packages=package_tree('vispy'),\n    package_dir={\n        'vispy': 'vispy'},\n    package_data={\n        'vispy': [op.join('io', '_data', '*'),\n                  op.join('html', 'static', 'js', '*'),\n                  op.join('app', 'tests', 'qt-designer.ui'),\n                  op.join('..', 'doc', '*'),\n                  ],\n\n        'vispy.glsl': ['*.vert','*.frag', \"*.glsl\"],\n        'vispy.glsl.antialias': ['*.vert','*.frag', \"*.glsl\"],\n        'vispy.glsl.arrowheads': ['*.vert','*.frag', \"*.glsl\"],\n        'vispy.glsl.arrows': ['*.vert','*.frag', \"*.glsl\"],\n        'vispy.glsl.collections': ['*.vert','*.frag', \"*.glsl\"],\n        'vispy.glsl.colormaps': ['*.vert','*.frag', \"*.glsl\"],\n        'vispy.glsl.lines': ['*.vert','*.frag', \"*.glsl\"],\n        'vispy.glsl.markers': ['*.vert','*.frag', \"*.glsl\"],\n        'vispy.glsl.math': ['*.vert','*.frag', \"*.glsl\"],\n        'vispy.glsl.misc': ['*.vert','*.frag', \"*.glsl\"],\n        'vispy.glsl.transforms': ['*.vert','*.frag', \"*.glsl\"],\n\n                  },\n    zip_safe=False,\n    classifiers=[\n        'Development Status :: 3 - Alpha',\n        'Intended Audience :: Science/Research',\n        'Intended Audience :: Education',\n        'Intended Audience :: Developers',\n        'Topic :: Scientific/Engineering :: Visualization',\n        'License :: OSI Approved :: BSD License',\n        'Operating System :: MacOS :: MacOS X',\n        'Operating System :: Microsoft :: Windows',\n        'Operating System :: POSIX',\n        'Programming Language :: Python',\n        'Programming Language :: Python :: 2.7',\n        'Programming Language :: Python :: 3.3',\n        'Programming Language :: Python :: 3.4',\n        'Programming Language :: Python :: 3.5',\n        'Programming Language :: Python :: 3.6',\n        'Framework :: IPython'\n    ],\n)\n", "path": "setup.py"}], "after_files": [{"content": "# -*- coding: utf-8 -*-\n# Copyright (c) Vispy Development Team. All Rights Reserved.\n# Distributed under the (new) BSD License. See LICENSE.txt for more info.\n\n\"\"\" Vispy setup script.\n\nSteps to do a new release:\n\nPreparations:\n  * Test on Windows, Linux, Mac\n  * Make release notes\n  * Update API documentation and other docs that need updating.\n  * Install 'twine' package for uploading to PyPI\n\nDefine the version:\n  * update __version__ in __init__.py\n  * tag the tip changeset as version x.x.x; `git tag -a 'vX.Y.Z'`\n\nTest installation:\n  * clear the build and dist dir (if they exist)\n  * python setup.py sdist\n  * twine register --repository-url https://test.pypi.org/legacy/ dist/*\n  * twine upload --repository-url https://test.pypi.org/legacy/ dist/*\n  * pip install -i https://testpypi.python.org/pypi vispy\n\nGenerate and upload package\n  * python setup.py sdist\n  * twine register dist/*\n  * twine upload dist/*\n\nAnnouncing:\n  * It can be worth waiting a day for eager users to report critical bugs\n  * Announce in scipy-user, vispy mailing list, G+\n\n\"\"\"\n\nimport os\nfrom os import path as op\nfrom warnings import warn\n\ntry:\n    # use setuptools namespace, allows for \"develop\"\n    import setuptools  # noqa, analysis:ignore\nexcept ImportError:\n    warn(\"unable to load setuptools. 'setup.py develop' will not work\")\n    pass  # it's not essential for installation\nfrom distutils.core import setup\n\nname = 'vispy'\ndescription = 'Interactive visualization in Python'\n\n\n# Get version and docstring\n__version__ = None\n__doc__ = ''\ndocStatus = 0  # Not started, in progress, done\ninitFile = os.path.join(os.path.dirname(__file__), 'vispy', '__init__.py')\nfor line in open(initFile).readlines():\n    if (line.startswith('version_info') or line.startswith('__version__')):\n        exec(line.strip())\n    elif line.startswith('\"\"\"'):\n        if docStatus == 0:\n            docStatus = 1\n            line = line.lstrip('\"')\n        elif docStatus == 1:\n            docStatus = 2\n    if docStatus == 1:\n        __doc__ += line\n\n\ndef package_tree(pkgroot):\n    path = os.path.dirname(__file__)\n    subdirs = [os.path.relpath(i[0], path).replace(os.path.sep, '.')\n               for i in os.walk(os.path.join(path, pkgroot))\n               if '__init__.py' in i[2]]\n    return subdirs\n\n\nsetup(\n    name=name,\n    version=__version__,\n    author='Vispy contributors',\n    author_email='vispy@googlegroups.com',\n    license='(new) BSD',\n    url='http://vispy.org',\n    download_url='https://pypi.python.org/pypi/vispy',\n    keywords=\"visualization OpenGl ES medical imaging 3D plotting \"\n             \"numpy bigdata\",\n    description=description,\n    long_description=__doc__,\n    platforms='any',\n    provides=['vispy'],\n    install_requires=['numpy'],\n    extras_require={\n        'ipython-static': ['ipython'],\n        'ipython-vnc': ['ipython>=2'],\n        'ipython-webgl': ['ipython>=2', 'tornado'],\n        'pyglet': ['pyglet>=1.2'],\n        # 'pyqt4': [],  # Why is this on PyPI, but without downloads?\n        # 'pyqt5': [],  # Ditto.\n        'pyside': ['PySide'],\n        'sdl2': ['PySDL2'],\n        'wx': ['wxPython'],\n    },\n    packages=package_tree('vispy'),\n    package_dir={\n        'vispy': 'vispy'},\n    package_data={\n        'vispy': [op.join('io', '_data', '*'),\n                  op.join('html', 'static', 'js', '*'),\n                  op.join('app', 'tests', 'qt-designer.ui'),\n                  ],\n\n        'vispy.glsl': ['*.vert','*.frag', \"*.glsl\"],\n        'vispy.glsl.antialias': ['*.vert','*.frag', \"*.glsl\"],\n        'vispy.glsl.arrowheads': ['*.vert','*.frag', \"*.glsl\"],\n        'vispy.glsl.arrows': ['*.vert','*.frag', \"*.glsl\"],\n        'vispy.glsl.collections': ['*.vert','*.frag', \"*.glsl\"],\n        'vispy.glsl.colormaps': ['*.vert','*.frag', \"*.glsl\"],\n        'vispy.glsl.lines': ['*.vert','*.frag', \"*.glsl\"],\n        'vispy.glsl.markers': ['*.vert','*.frag', \"*.glsl\"],\n        'vispy.glsl.math': ['*.vert','*.frag', \"*.glsl\"],\n        'vispy.glsl.misc': ['*.vert','*.frag', \"*.glsl\"],\n        'vispy.glsl.transforms': ['*.vert','*.frag', \"*.glsl\"],\n\n                  },\n    zip_safe=False,\n    classifiers=[\n        'Development Status :: 3 - Alpha',\n        'Intended Audience :: Science/Research',\n        'Intended Audience :: Education',\n        'Intended Audience :: Developers',\n        'Topic :: Scientific/Engineering :: Visualization',\n        'License :: OSI Approved :: BSD License',\n        'Operating System :: MacOS :: MacOS X',\n        'Operating System :: Microsoft :: Windows',\n        'Operating System :: POSIX',\n        'Programming Language :: Python',\n        'Programming Language :: Python :: 2.7',\n        'Programming Language :: Python :: 3.3',\n        'Programming Language :: Python :: 3.4',\n        'Programming Language :: Python :: 3.5',\n        'Programming Language :: Python :: 3.6',\n        'Framework :: IPython'\n    ],\n)\n", "path": "setup.py"}]}