We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Test documentation markdown documentation python
With the switch of some of the documentation from notebook files to markdown files, it makes sense to add a way to test all the code blocks to verify it is able to run from top to bottom. 

--- 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 #!/usr/bin/env python
2 import json
3 import os
4 import shutil
5 import sys
6 
7 import pyct.build
8 
9 from setuptools import find_packages, setup
10 from setuptools.command.develop import develop
11 from setuptools.command.install import install
12 from setuptools.command.sdist import sdist
13 
14 PANEL_LITE_BUILD = 'PANEL_LITE' in os.environ
15 
16 
17 def get_setup_version(reponame):
18     """
19     Helper to get the current version from either git describe or the
20     .version file (if available).
21     """
22     basepath = os.path.split(__file__)[0]
23     version_file_path = os.path.join(basepath, reponame, '.version')
24     try:
25         from param import version
26     except Exception:
27         version = None
28     if version is not None:
29         return version.Version.setup_version(basepath, reponame, archive_commit="$Format:%h$")
30     else:
31         print("WARNING: param>=1.6.0 unavailable. If you are installing a package, "
32               "this warning can safely be ignored. If you are creating a package or "
33               "otherwise operating in a git repository, you should install param>=1.6.0.")
34         return json.load(open(version_file_path, 'r'))['version_string']
35 
36 
37 def _build_paneljs():
38     from bokeh.ext import build
39 
40     from panel.compiler import bundle_resources
41     print("Building custom models:")
42     panel_dir = os.path.join(os.path.dirname(__file__), "panel")
43     build(panel_dir)
44     print("Bundling custom model resources:")
45     bundle_resources()
46     if sys.platform != "win32":
47         # npm can cause non-blocking stdout; so reset it just in case
48         import fcntl
49         flags = fcntl.fcntl(sys.stdout, fcntl.F_GETFL)
50         fcntl.fcntl(sys.stdout, fcntl.F_SETFL, flags&~os.O_NONBLOCK)
51 
52 
53 class CustomDevelopCommand(develop):
54     """Custom installation for development mode."""
55 
56     def run(self):
57         if not PANEL_LITE_BUILD:
58             _build_paneljs()
59         develop.run(self)
60 
61 
62 class CustomInstallCommand(install):
63     """Custom installation for install mode."""
64 
65     def run(self):
66         if not PANEL_LITE_BUILD:
67             _build_paneljs()
68         install.run(self)
69 
70 
71 class CustomSdistCommand(sdist):
72     """Custom installation for sdist mode."""
73 
74     def run(self):
75         if not PANEL_LITE_BUILD:
76             _build_paneljs()
77         sdist.run(self)
78 
79 
80 _COMMANDS = {
81     'develop': CustomDevelopCommand,
82     'install': CustomInstallCommand,
83     'sdist':   CustomSdistCommand,
84 }
85 
86 try:
87     from wheel.bdist_wheel import bdist_wheel
88 
89     class CustomBdistWheelCommand(bdist_wheel):
90         """Custom bdist_wheel command to force cancelling qiskit-terra wheel
91         creation."""
92 
93         def run(self):
94             """Do nothing so the command intentionally fails."""
95             if not PANEL_LITE_BUILD:
96                 _build_paneljs()
97             bdist_wheel.run(self)
98 
99     _COMMANDS['bdist_wheel'] = CustomBdistWheelCommand
100 except Exception:
101     pass
102 
103 ########## dependencies ##########
104 
105 install_requires = [
106     'bokeh >=2.4.0,<2.5.0',
107     'param >=1.12.0',
108     'pyviz_comms >=0.7.4',
109     'markdown',
110     'requests',
111     'tqdm >=4.48.0',
112     'pyct >=0.4.4',
113     'bleach',
114     'setuptools',
115     'typing_extensions'
116 ]
117 
118 _recommended = [
119     'jupyterlab',
120     'holoviews >1.14.1',
121     'matplotlib',
122     'pillow',
123     'plotly'
124 ]
125 
126 _tests = [
127     # Test dependencies
128     'flake8',
129     'parameterized',
130     'pytest',
131     'nbval',
132     'flaky',
133     'pytest-xdist',
134     'pytest-cov',
135     'pre-commit',
136     # Libraries tested in unit tests
137     'folium',
138     'ipympl',
139     'scipy',
140     'twine',
141     'pandas >=1.3',
142     'ipython >=7.0',
143     'holoviews',
144     'diskcache',
145     # Temporary pins (jupyter_bokeh needs updates)
146     'ipywidgets <8.0'
147 ]
148 
149 _ui = [
150     'playwright',
151     'pytest-playwright'
152 ]
153 
154 extras_require = {
155     'examples': [
156         'hvplot',
157         'plotly >=4.0',
158         'altair',
159         'streamz',
160         'vega_datasets',
161         'vtk ==9.0.1',
162         'scikit-learn',
163         'datashader',
164         'jupyter_bokeh >=3.0.2',
165         'django <4',
166         'channels',
167         'pyvista<0.33',
168         'ipywidgets',
169         'ipywidgets_bokeh',
170         'ipyvolume',
171         'ipyleaflet',
172         'ipympl',
173         'folium',
174         'xarray',
175         'pyinstrument >=4.0',
176         'aiohttp',
177         'croniter',
178         'graphviz',
179         'networkx >=2.5',
180         'pygraphviz',
181         'seaborn',
182     ],
183     'tests': _tests,
184     'recommended': _recommended,
185     'doc': _recommended + [
186         'nbsite >=0.7.2rc2',
187         'graphviz',
188         'lxml',
189         'python-graphviz',
190         'pydata-sphinx-theme',
191         'sphinx-copybutton',
192         'sphinx-design',
193         'pydeck',
194     ],
195     'ui': _ui
196 }
197 
198 extras_require['all'] = sorted(set(sum(extras_require.values(), [])))
199 
200 # Superset of what's in pyproject.toml (includes non-python
201 # dependencies).  Also, pyproject.toml isn't supported by all tools
202 # anyway (e.g. older versions of pip, or conda - which also supports
203 # non-python dependencies). Note that setup_requires isn't used
204 # because it doesn't work well with pip.
205 extras_require['build'] = [
206     'param >=1.9.2',
207     'pyct >=0.4.4',
208     'setuptools >=42',
209     'bokeh >=2.4.3',
210     'pyviz_comms >=0.6.0',
211     'bleach',
212     'tqdm',
213     'twine',
214     'rfc3986>=1.4.0'
215 ]
216 
217 setup_args = dict(
218     name='panel',
219     version=get_setup_version("panel"),
220     description='A high level app and dashboarding solution for Python.',
221     long_description=open('README.md').read() if os.path.isfile('README.md') else 'Consult README.md',
222     long_description_content_type="text/markdown",
223     author="HoloViz",
224     author_email="developers@holoviz.org",
225     maintainer="HoloViz",
226     maintainer_email="developers@holoviz.org",
227     platforms=['Windows', 'Mac OS X', 'Linux'],
228     license='BSD',
229     url='http://panel.holoviz.org',
230     project_urls={
231         'Source': 'https://github.com/holoviz/panel',
232     },
233     cmdclass=_COMMANDS,
234     packages=find_packages(),
235     include_package_data=True,
236     data_files=[
237         # like `jupyter serverextension enable --sys-prefix`
238         (
239             "etc/jupyter/jupyter_notebook_config.d",
240             ["jupyter-config/jupyter_notebook_config.d/panel-client-jupyter.json"],
241         ),
242         # like `jupyter server extension enable --sys-prefix`
243         (
244             "etc/jupyter/jupyter_server_config.d",
245             ["jupyter-config/jupyter_server_config.d/panel-client-jupyter.json"],
246         ),
247     ],
248     classifiers=[
249         "License :: OSI Approved :: BSD License",
250         "Development Status :: 5 - Production/Stable",
251         "Programming Language :: Python :: 3",
252         "Programming Language :: Python :: 3.7",
253         "Programming Language :: Python :: 3.8",
254         "Programming Language :: Python :: 3.9",
255         "Programming Language :: Python :: 3.10",
256         "Operating System :: OS Independent",
257         "Intended Audience :: Developers",
258         "Intended Audience :: Science/Research",
259         "Intended Audience :: Financial and Insurance Industry",
260         "Intended Audience :: Healthcare Industry",
261         "Intended Audience :: Information Technology",
262         "Intended Audience :: Legal Industry",
263         "Intended Audience :: Other Audience",
264         "Intended Audience :: Science/Research",
265         "Natural Language :: English",
266         "Topic :: Scientific/Engineering",
267         "Topic :: Scientific/Engineering :: Visualization",
268         "Topic :: Scientific/Engineering :: Information Analysis",
269         "Topic :: Office/Business",
270         "Topic :: Office/Business :: Financial",
271         "Topic :: Software Development :: Libraries"],
272     python_requires=">=3.7",
273     entry_points={
274         'console_scripts': [
275             'panel = panel.command:main'
276         ]
277     },
278     install_requires=install_requires,
279     extras_require=extras_require,
280     tests_require=extras_require['tests']
281 )
282 
283 def clean_js_version(version):
284     version = version.replace('-', '')
285     for dev in ('a', 'b', 'rc'):
286         version = version.replace(dev+'.', dev)
287     return version
288 
289 if __name__ == "__main__":
290     example_path = os.path.join(os.path.dirname(os.path.abspath(__file__)),
291                                 'panel', 'examples')
292 
293     if 'develop' not in sys.argv and 'egg_info' not in sys.argv:
294         pyct.build.examples(example_path, __file__, force=True)
295 
296     version = setup_args['version']
297     if 'post' not in version:
298         with open('./panel/package.json') as f:
299             package_json = json.load(f)
300         js_version = package_json['version']
301         version = version.split('+')[0]
302         if any(dev in version for dev in ('a', 'b', 'rc')) and not '-' in js_version:
303             raise ValueError(f"panel.js dev versions ({js_version}) must "
304                              "must separate dev suffix with a dash, e.g. "
305                              "v1.0.0rc1 should be v1.0.0-rc.1.")
306         if version != 'None' and version != clean_js_version(js_version):
307             raise ValueError(f"panel.js version ({js_version}) does not match "
308                              f"panel version ({version}). Cannot build release.")
309 
310     setup(**setup_args)
311 
312     if os.path.isdir(example_path):
313         shutil.rmtree(example_path)
314
```
--- 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
@@ -142,6 +142,7 @@
     'ipython >=7.0',
     'holoviews',
     'diskcache',
+    "markdown-it-py",
     # Temporary pins (jupyter_bokeh needs updates)
     'ipywidgets <8.0'
 ]

{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -142,6 +142,7 @@\n     'ipython >=7.0',\n     'holoviews',\n     'diskcache',\n+    \"markdown-it-py\",\n     # Temporary pins (jupyter_bokeh needs updates)\n     'ipywidgets <8.0'\n ]\n", "issue": "Test documentation markdown documentation python\nWith the switch of some of the documentation from notebook files to markdown files, it makes sense to add a way to test all the code blocks to verify it is able to run from top to bottom. \n", "before_files": [{"content": "#!/usr/bin/env python\nimport json\nimport os\nimport shutil\nimport sys\n\nimport pyct.build\n\nfrom setuptools import find_packages, setup\nfrom setuptools.command.develop import develop\nfrom setuptools.command.install import install\nfrom setuptools.command.sdist import sdist\n\nPANEL_LITE_BUILD = 'PANEL_LITE' in os.environ\n\n\ndef get_setup_version(reponame):\n    \"\"\"\n    Helper to get the current version from either git describe or the\n    .version file (if available).\n    \"\"\"\n    basepath = os.path.split(__file__)[0]\n    version_file_path = os.path.join(basepath, reponame, '.version')\n    try:\n        from param import version\n    except Exception:\n        version = None\n    if version is not None:\n        return version.Version.setup_version(basepath, reponame, archive_commit=\"$Format:%h$\")\n    else:\n        print(\"WARNING: param>=1.6.0 unavailable. If you are installing a package, \"\n              \"this warning can safely be ignored. If you are creating a package or \"\n              \"otherwise operating in a git repository, you should install param>=1.6.0.\")\n        return json.load(open(version_file_path, 'r'))['version_string']\n\n\ndef _build_paneljs():\n    from bokeh.ext import build\n\n    from panel.compiler import bundle_resources\n    print(\"Building custom models:\")\n    panel_dir = os.path.join(os.path.dirname(__file__), \"panel\")\n    build(panel_dir)\n    print(\"Bundling custom model resources:\")\n    bundle_resources()\n    if sys.platform != \"win32\":\n        # npm can cause non-blocking stdout; so reset it just in case\n        import fcntl\n        flags = fcntl.fcntl(sys.stdout, fcntl.F_GETFL)\n        fcntl.fcntl(sys.stdout, fcntl.F_SETFL, flags&~os.O_NONBLOCK)\n\n\nclass CustomDevelopCommand(develop):\n    \"\"\"Custom installation for development mode.\"\"\"\n\n    def run(self):\n        if not PANEL_LITE_BUILD:\n            _build_paneljs()\n        develop.run(self)\n\n\nclass CustomInstallCommand(install):\n    \"\"\"Custom installation for install mode.\"\"\"\n\n    def run(self):\n        if not PANEL_LITE_BUILD:\n            _build_paneljs()\n        install.run(self)\n\n\nclass CustomSdistCommand(sdist):\n    \"\"\"Custom installation for sdist mode.\"\"\"\n\n    def run(self):\n        if not PANEL_LITE_BUILD:\n            _build_paneljs()\n        sdist.run(self)\n\n\n_COMMANDS = {\n    'develop': CustomDevelopCommand,\n    'install': CustomInstallCommand,\n    'sdist':   CustomSdistCommand,\n}\n\ntry:\n    from wheel.bdist_wheel import bdist_wheel\n\n    class CustomBdistWheelCommand(bdist_wheel):\n        \"\"\"Custom bdist_wheel command to force cancelling qiskit-terra wheel\n        creation.\"\"\"\n\n        def run(self):\n            \"\"\"Do nothing so the command intentionally fails.\"\"\"\n            if not PANEL_LITE_BUILD:\n                _build_paneljs()\n            bdist_wheel.run(self)\n\n    _COMMANDS['bdist_wheel'] = CustomBdistWheelCommand\nexcept Exception:\n    pass\n\n########## dependencies ##########\n\ninstall_requires = [\n    'bokeh >=2.4.0,<2.5.0',\n    'param >=1.12.0',\n    'pyviz_comms >=0.7.4',\n    'markdown',\n    'requests',\n    'tqdm >=4.48.0',\n    'pyct >=0.4.4',\n    'bleach',\n    'setuptools',\n    'typing_extensions'\n]\n\n_recommended = [\n    'jupyterlab',\n    'holoviews >1.14.1',\n    'matplotlib',\n    'pillow',\n    'plotly'\n]\n\n_tests = [\n    # Test dependencies\n    'flake8',\n    'parameterized',\n    'pytest',\n    'nbval',\n    'flaky',\n    'pytest-xdist',\n    'pytest-cov',\n    'pre-commit',\n    # Libraries tested in unit tests\n    'folium',\n    'ipympl',\n    'scipy',\n    'twine',\n    'pandas >=1.3',\n    'ipython >=7.0',\n    'holoviews',\n    'diskcache',\n    # Temporary pins (jupyter_bokeh needs updates)\n    'ipywidgets <8.0'\n]\n\n_ui = [\n    'playwright',\n    'pytest-playwright'\n]\n\nextras_require = {\n    'examples': [\n        'hvplot',\n        'plotly >=4.0',\n        'altair',\n        'streamz',\n        'vega_datasets',\n        'vtk ==9.0.1',\n        'scikit-learn',\n        'datashader',\n        'jupyter_bokeh >=3.0.2',\n        'django <4',\n        'channels',\n        'pyvista<0.33',\n        'ipywidgets',\n        'ipywidgets_bokeh',\n        'ipyvolume',\n        'ipyleaflet',\n        'ipympl',\n        'folium',\n        'xarray',\n        'pyinstrument >=4.0',\n        'aiohttp',\n        'croniter',\n        'graphviz',\n        'networkx >=2.5',\n        'pygraphviz',\n        'seaborn',\n    ],\n    'tests': _tests,\n    'recommended': _recommended,\n    'doc': _recommended + [\n        'nbsite >=0.7.2rc2',\n        'graphviz',\n        'lxml',\n        'python-graphviz',\n        'pydata-sphinx-theme',\n        'sphinx-copybutton',\n        'sphinx-design',\n        'pydeck',\n    ],\n    'ui': _ui\n}\n\nextras_require['all'] = sorted(set(sum(extras_require.values(), [])))\n\n# Superset of what's in pyproject.toml (includes non-python\n# dependencies).  Also, pyproject.toml isn't supported by all tools\n# anyway (e.g. older versions of pip, or conda - which also supports\n# non-python dependencies). Note that setup_requires isn't used\n# because it doesn't work well with pip.\nextras_require['build'] = [\n    'param >=1.9.2',\n    'pyct >=0.4.4',\n    'setuptools >=42',\n    'bokeh >=2.4.3',\n    'pyviz_comms >=0.6.0',\n    'bleach',\n    'tqdm',\n    'twine',\n    'rfc3986>=1.4.0'\n]\n\nsetup_args = dict(\n    name='panel',\n    version=get_setup_version(\"panel\"),\n    description='A high level app and dashboarding solution for Python.',\n    long_description=open('README.md').read() if os.path.isfile('README.md') else 'Consult README.md',\n    long_description_content_type=\"text/markdown\",\n    author=\"HoloViz\",\n    author_email=\"developers@holoviz.org\",\n    maintainer=\"HoloViz\",\n    maintainer_email=\"developers@holoviz.org\",\n    platforms=['Windows', 'Mac OS X', 'Linux'],\n    license='BSD',\n    url='http://panel.holoviz.org',\n    project_urls={\n        'Source': 'https://github.com/holoviz/panel',\n    },\n    cmdclass=_COMMANDS,\n    packages=find_packages(),\n    include_package_data=True,\n    data_files=[\n        # like `jupyter serverextension enable --sys-prefix`\n        (\n            \"etc/jupyter/jupyter_notebook_config.d\",\n            [\"jupyter-config/jupyter_notebook_config.d/panel-client-jupyter.json\"],\n        ),\n        # like `jupyter server extension enable --sys-prefix`\n        (\n            \"etc/jupyter/jupyter_server_config.d\",\n            [\"jupyter-config/jupyter_server_config.d/panel-client-jupyter.json\"],\n        ),\n    ],\n    classifiers=[\n        \"License :: OSI Approved :: BSD License\",\n        \"Development Status :: 5 - Production/Stable\",\n        \"Programming Language :: Python :: 3\",\n        \"Programming Language :: Python :: 3.7\",\n        \"Programming Language :: Python :: 3.8\",\n        \"Programming Language :: Python :: 3.9\",\n        \"Programming Language :: Python :: 3.10\",\n        \"Operating System :: OS Independent\",\n        \"Intended Audience :: Developers\",\n        \"Intended Audience :: Science/Research\",\n        \"Intended Audience :: Financial and Insurance Industry\",\n        \"Intended Audience :: Healthcare Industry\",\n        \"Intended Audience :: Information Technology\",\n        \"Intended Audience :: Legal Industry\",\n        \"Intended Audience :: Other Audience\",\n        \"Intended Audience :: Science/Research\",\n        \"Natural Language :: English\",\n        \"Topic :: Scientific/Engineering\",\n        \"Topic :: Scientific/Engineering :: Visualization\",\n        \"Topic :: Scientific/Engineering :: Information Analysis\",\n        \"Topic :: Office/Business\",\n        \"Topic :: Office/Business :: Financial\",\n        \"Topic :: Software Development :: Libraries\"],\n    python_requires=\">=3.7\",\n    entry_points={\n        'console_scripts': [\n            'panel = panel.command:main'\n        ]\n    },\n    install_requires=install_requires,\n    extras_require=extras_require,\n    tests_require=extras_require['tests']\n)\n\ndef clean_js_version(version):\n    version = version.replace('-', '')\n    for dev in ('a', 'b', 'rc'):\n        version = version.replace(dev+'.', dev)\n    return version\n\nif __name__ == \"__main__\":\n    example_path = os.path.join(os.path.dirname(os.path.abspath(__file__)),\n                                'panel', 'examples')\n\n    if 'develop' not in sys.argv and 'egg_info' not in sys.argv:\n        pyct.build.examples(example_path, __file__, force=True)\n\n    version = setup_args['version']\n    if 'post' not in version:\n        with open('./panel/package.json') as f:\n            package_json = json.load(f)\n        js_version = package_json['version']\n        version = version.split('+')[0]\n        if any(dev in version for dev in ('a', 'b', 'rc')) and not '-' in js_version:\n            raise ValueError(f\"panel.js dev versions ({js_version}) must \"\n                             \"must separate dev suffix with a dash, e.g. \"\n                             \"v1.0.0rc1 should be v1.0.0-rc.1.\")\n        if version != 'None' and version != clean_js_version(js_version):\n            raise ValueError(f\"panel.js version ({js_version}) does not match \"\n                             f\"panel version ({version}). Cannot build release.\")\n\n    setup(**setup_args)\n\n    if os.path.isdir(example_path):\n        shutil.rmtree(example_path)\n", "path": "setup.py"}], "after_files": [{"content": "#!/usr/bin/env python\nimport json\nimport os\nimport shutil\nimport sys\n\nimport pyct.build\n\nfrom setuptools import find_packages, setup\nfrom setuptools.command.develop import develop\nfrom setuptools.command.install import install\nfrom setuptools.command.sdist import sdist\n\nPANEL_LITE_BUILD = 'PANEL_LITE' in os.environ\n\n\ndef get_setup_version(reponame):\n    \"\"\"\n    Helper to get the current version from either git describe or the\n    .version file (if available).\n    \"\"\"\n    basepath = os.path.split(__file__)[0]\n    version_file_path = os.path.join(basepath, reponame, '.version')\n    try:\n        from param import version\n    except Exception:\n        version = None\n    if version is not None:\n        return version.Version.setup_version(basepath, reponame, archive_commit=\"$Format:%h$\")\n    else:\n        print(\"WARNING: param>=1.6.0 unavailable. If you are installing a package, \"\n              \"this warning can safely be ignored. If you are creating a package or \"\n              \"otherwise operating in a git repository, you should install param>=1.6.0.\")\n        return json.load(open(version_file_path, 'r'))['version_string']\n\n\ndef _build_paneljs():\n    from bokeh.ext import build\n\n    from panel.compiler import bundle_resources\n    print(\"Building custom models:\")\n    panel_dir = os.path.join(os.path.dirname(__file__), \"panel\")\n    build(panel_dir)\n    print(\"Bundling custom model resources:\")\n    bundle_resources()\n    if sys.platform != \"win32\":\n        # npm can cause non-blocking stdout; so reset it just in case\n        import fcntl\n        flags = fcntl.fcntl(sys.stdout, fcntl.F_GETFL)\n        fcntl.fcntl(sys.stdout, fcntl.F_SETFL, flags&~os.O_NONBLOCK)\n\n\nclass CustomDevelopCommand(develop):\n    \"\"\"Custom installation for development mode.\"\"\"\n\n    def run(self):\n        if not PANEL_LITE_BUILD:\n            _build_paneljs()\n        develop.run(self)\n\n\nclass CustomInstallCommand(install):\n    \"\"\"Custom installation for install mode.\"\"\"\n\n    def run(self):\n        if not PANEL_LITE_BUILD:\n            _build_paneljs()\n        install.run(self)\n\n\nclass CustomSdistCommand(sdist):\n    \"\"\"Custom installation for sdist mode.\"\"\"\n\n    def run(self):\n        if not PANEL_LITE_BUILD:\n            _build_paneljs()\n        sdist.run(self)\n\n\n_COMMANDS = {\n    'develop': CustomDevelopCommand,\n    'install': CustomInstallCommand,\n    'sdist':   CustomSdistCommand,\n}\n\ntry:\n    from wheel.bdist_wheel import bdist_wheel\n\n    class CustomBdistWheelCommand(bdist_wheel):\n        \"\"\"Custom bdist_wheel command to force cancelling qiskit-terra wheel\n        creation.\"\"\"\n\n        def run(self):\n            \"\"\"Do nothing so the command intentionally fails.\"\"\"\n            if not PANEL_LITE_BUILD:\n                _build_paneljs()\n            bdist_wheel.run(self)\n\n    _COMMANDS['bdist_wheel'] = CustomBdistWheelCommand\nexcept Exception:\n    pass\n\n########## dependencies ##########\n\ninstall_requires = [\n    'bokeh >=2.4.0,<2.5.0',\n    'param >=1.12.0',\n    'pyviz_comms >=0.7.4',\n    'markdown',\n    'requests',\n    'tqdm >=4.48.0',\n    'pyct >=0.4.4',\n    'bleach',\n    'setuptools',\n    'typing_extensions'\n]\n\n_recommended = [\n    'jupyterlab',\n    'holoviews >1.14.1',\n    'matplotlib',\n    'pillow',\n    'plotly'\n]\n\n_tests = [\n    # Test dependencies\n    'flake8',\n    'parameterized',\n    'pytest',\n    'nbval',\n    'flaky',\n    'pytest-xdist',\n    'pytest-cov',\n    'pre-commit',\n    # Libraries tested in unit tests\n    'folium',\n    'ipympl',\n    'scipy',\n    'twine',\n    'pandas >=1.3',\n    'ipython >=7.0',\n    'holoviews',\n    'diskcache',\n    \"markdown-it-py\",\n    # Temporary pins (jupyter_bokeh needs updates)\n    'ipywidgets <8.0'\n]\n\n_ui = [\n    'playwright',\n    'pytest-playwright'\n]\n\nextras_require = {\n    'examples': [\n        'hvplot',\n        'plotly >=4.0',\n        'altair',\n        'streamz',\n        'vega_datasets',\n        'vtk ==9.0.1',\n        'scikit-learn',\n        'datashader',\n        'jupyter_bokeh >=3.0.2',\n        'django <4',\n        'channels',\n        'pyvista<0.33',\n        'ipywidgets',\n        'ipywidgets_bokeh',\n        'ipyvolume',\n        'ipyleaflet',\n        'ipympl',\n        'folium',\n        'xarray',\n        'pyinstrument >=4.0',\n        'aiohttp',\n        'croniter',\n        'graphviz',\n        'networkx >=2.5',\n        'pygraphviz',\n        'seaborn',\n    ],\n    'tests': _tests,\n    'recommended': _recommended,\n    'doc': _recommended + [\n        'nbsite >=0.7.2rc2',\n        'graphviz',\n        'lxml',\n        'python-graphviz',\n        'pydata-sphinx-theme',\n        'sphinx-copybutton',\n        'sphinx-design',\n        'pydeck',\n    ],\n    'ui': _ui\n}\n\nextras_require['all'] = sorted(set(sum(extras_require.values(), [])))\n\n# Superset of what's in pyproject.toml (includes non-python\n# dependencies).  Also, pyproject.toml isn't supported by all tools\n# anyway (e.g. older versions of pip, or conda - which also supports\n# non-python dependencies). Note that setup_requires isn't used\n# because it doesn't work well with pip.\nextras_require['build'] = [\n    'param >=1.9.2',\n    'pyct >=0.4.4',\n    'setuptools >=42',\n    'bokeh >=2.4.3',\n    'pyviz_comms >=0.6.0',\n    'bleach',\n    'tqdm',\n    'twine',\n    'rfc3986>=1.4.0'\n]\n\nsetup_args = dict(\n    name='panel',\n    version=get_setup_version(\"panel\"),\n    description='A high level app and dashboarding solution for Python.',\n    long_description=open('README.md').read() if os.path.isfile('README.md') else 'Consult README.md',\n    long_description_content_type=\"text/markdown\",\n    author=\"HoloViz\",\n    author_email=\"developers@holoviz.org\",\n    maintainer=\"HoloViz\",\n    maintainer_email=\"developers@holoviz.org\",\n    platforms=['Windows', 'Mac OS X', 'Linux'],\n    license='BSD',\n    url='http://panel.holoviz.org',\n    project_urls={\n        'Source': 'https://github.com/holoviz/panel',\n    },\n    cmdclass=_COMMANDS,\n    packages=find_packages(),\n    include_package_data=True,\n    data_files=[\n        # like `jupyter serverextension enable --sys-prefix`\n        (\n            \"etc/jupyter/jupyter_notebook_config.d\",\n            [\"jupyter-config/jupyter_notebook_config.d/panel-client-jupyter.json\"],\n        ),\n        # like `jupyter server extension enable --sys-prefix`\n        (\n            \"etc/jupyter/jupyter_server_config.d\",\n            [\"jupyter-config/jupyter_server_config.d/panel-client-jupyter.json\"],\n        ),\n    ],\n    classifiers=[\n        \"License :: OSI Approved :: BSD License\",\n        \"Development Status :: 5 - Production/Stable\",\n        \"Programming Language :: Python :: 3\",\n        \"Programming Language :: Python :: 3.7\",\n        \"Programming Language :: Python :: 3.8\",\n        \"Programming Language :: Python :: 3.9\",\n        \"Programming Language :: Python :: 3.10\",\n        \"Operating System :: OS Independent\",\n        \"Intended Audience :: Developers\",\n        \"Intended Audience :: Science/Research\",\n        \"Intended Audience :: Financial and Insurance Industry\",\n        \"Intended Audience :: Healthcare Industry\",\n        \"Intended Audience :: Information Technology\",\n        \"Intended Audience :: Legal Industry\",\n        \"Intended Audience :: Other Audience\",\n        \"Intended Audience :: Science/Research\",\n        \"Natural Language :: English\",\n        \"Topic :: Scientific/Engineering\",\n        \"Topic :: Scientific/Engineering :: Visualization\",\n        \"Topic :: Scientific/Engineering :: Information Analysis\",\n        \"Topic :: Office/Business\",\n        \"Topic :: Office/Business :: Financial\",\n        \"Topic :: Software Development :: Libraries\"],\n    python_requires=\">=3.7\",\n    entry_points={\n        'console_scripts': [\n            'panel = panel.command:main'\n        ]\n    },\n    install_requires=install_requires,\n    extras_require=extras_require,\n    tests_require=extras_require['tests']\n)\n\ndef clean_js_version(version):\n    version = version.replace('-', '')\n    for dev in ('a', 'b', 'rc'):\n        version = version.replace(dev+'.', dev)\n    return version\n\nif __name__ == \"__main__\":\n    example_path = os.path.join(os.path.dirname(os.path.abspath(__file__)),\n                                'panel', 'examples')\n\n    if 'develop' not in sys.argv and 'egg_info' not in sys.argv:\n        pyct.build.examples(example_path, __file__, force=True)\n\n    version = setup_args['version']\n    if 'post' not in version:\n        with open('./panel/package.json') as f:\n            package_json = json.load(f)\n        js_version = package_json['version']\n        version = version.split('+')[0]\n        if any(dev in version for dev in ('a', 'b', 'rc')) and not '-' in js_version:\n            raise ValueError(f\"panel.js dev versions ({js_version}) must \"\n                             \"must separate dev suffix with a dash, e.g. \"\n                             \"v1.0.0rc1 should be v1.0.0-rc.1.\")\n        if version != 'None' and version != clean_js_version(js_version):\n            raise ValueError(f\"panel.js version ({js_version}) does not match \"\n                             f\"panel version ({version}). Cannot build release.\")\n\n    setup(**setup_args)\n\n    if os.path.isdir(example_path):\n        shutil.rmtree(example_path)\n", "path": "setup.py"}]}