We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Activation of kernel env fails when using anaconda shortcut (FileNotFound error kernel start 4.1.0)
<!--- **PLEASE READ:** When submitting here, please ensure you've completed the following checklist and checked the boxes to confirm. Issue reports without it may be closed. Thanks! --->
## Problem Description

Spyder4.1.0 IPython kernel startup error
Close spyder and restart, the problem persists.
### What steps reproduce the problem?

After upgrading spyder4.0.1 to 4.1.0, IPython kernel startup error occurs when starting spyder.
The following command is used to upgrade in a virtual environment:
conda install spyder=4.1.0
```python-traceback
启动 IPython 内核时发生错误（An error occurred while starting the IPython kernel）
错误：（Error）
Traceback (most recent call last):
File "C:\Users\Admin\Anaconda3\envs\python37\lib\site‑packages\spyder\plugins\ipythonconsole\plugin.py", line 1209, in create_kernel_manager_and_kernel_client
kernel_manager.start_kernel(stderr=stderr_handle, **kwargs)
File "C:\Users\Admin\Anaconda3\envs\python37\lib\site‑packages\jupyter_client\manager.py", line 259, in start_kernel
**kw)
File "C:\Users\Admin\Anaconda3\envs\python37\lib\site‑packages\jupyter_client\manager.py", line 204, in _launch_kernel
return launch_kernel(kernel_cmd, **kw)
File "C:\Users\Admin\Anaconda3\envs\python37\lib\site‑packages\jupyter_client\launcher.py", line 138, in launch_kernel
proc = Popen(cmd, **kwargs)
File "C:\Users\Admin\Anaconda3\envs\python37\lib\subprocess.py", line 800, in __init__
restore_signals, start_new_session)
File "C:\Users\Admin\Anaconda3\envs\python37\lib\subprocess.py", line 1207, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] 系统找不到指定的文件（The system can not find the file specified）。
```

## Versions
<!--- You can get this information from Help > About Spyder...
or (if Spyder won't launch) the "conda list" command
from the Anaconda Prompt/Terminal/command line. --->

* Spyder version: 4.1.0
* Python version: Python3.7.5
* Qt version: 5.9.6
* PyQt version: 5.9.2
* Operating System name/version: win10


--- 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 #
3 # Copyright © Spyder Project Contributors
4 # Licensed under the terms of the MIT License
5 # (see spyder/__init__.py for details)
6 
7 """
8 Spyder
9 ======
10 
11 The Scientific Python Development Environment
12 
13 Spyder is a powerful scientific environment written in Python, for Python,
14 and designed by and for scientists, engineers and data analysts.
15 
16 It features a unique combination of the advanced editing, analysis, debugging
17 and profiling functionality of a comprehensive development tool with the data
18 exploration, interactive execution, deep inspection and beautiful visualization
19 capabilities of a scientific package.
20 """
21 
22 from __future__ import print_function
23 
24 import io
25 import os
26 import os.path as osp
27 import subprocess
28 import sys
29 import shutil
30 
31 from distutils.core import setup
32 from distutils.command.install_data import install_data
33 
34 
35 #==============================================================================
36 # Check for Python 3
37 #==============================================================================
38 PY3 = sys.version_info[0] == 3
39 
40 
41 #==============================================================================
42 # Minimal Python version sanity check
43 # Taken from the notebook setup.py -- Modified BSD License
44 #==============================================================================
45 v = sys.version_info
46 if v[:2] < (2, 7) or (v[0] >= 3 and v[:2] < (3, 5)):
47     error = "ERROR: Spyder requires Python version 2.7 or 3.5 and above."
48     print(error, file=sys.stderr)
49     sys.exit(1)
50 
51 
52 #==============================================================================
53 # Constants
54 #==============================================================================
55 NAME = 'spyder'
56 LIBNAME = 'spyder'
57 from spyder import __version__, __website_url__  #analysis:ignore
58 
59 
60 #==============================================================================
61 # Auxiliary functions
62 #==============================================================================
63 def get_package_data(name, extlist):
64     """Return data files for package *name* with extensions in *extlist*"""
65     flist = []
66     # Workaround to replace os.path.relpath (not available until Python 2.6):
67     offset = len(name)+len(os.pathsep)
68     for dirpath, _dirnames, filenames in os.walk(name):
69         if 'tests' not in dirpath:
70             for fname in filenames:
71                 if (not fname.startswith('.') and
72                         osp.splitext(fname)[1] in extlist):
73                     flist.append(osp.join(dirpath, fname)[offset:])
74     return flist
75 
76 
77 def get_subpackages(name):
78     """Return subpackages of package *name*"""
79     splist = []
80     for dirpath, _dirnames, _filenames in os.walk(name):
81         if 'tests' not in dirpath:
82             if osp.isfile(osp.join(dirpath, '__init__.py')):
83                 splist.append(".".join(dirpath.split(os.sep)))
84     return splist
85 
86 
87 def get_data_files():
88     """Return data_files in a platform dependent manner"""
89     if sys.platform.startswith('linux'):
90         if PY3:
91             data_files = [('share/applications', ['scripts/spyder3.desktop']),
92                           ('share/icons', ['img_src/spyder3.png']),
93                           ('share/metainfo', ['scripts/spyder3.appdata.xml'])]
94         else:
95             data_files = [('share/applications', ['scripts/spyder.desktop']),
96                           ('share/icons', ['img_src/spyder.png'])]
97     elif os.name == 'nt':
98         data_files = [('scripts', ['img_src/spyder.ico',
99                                    'img_src/spyder_reset.ico'])]
100     else:
101         data_files = []
102     return data_files
103 
104 
105 def get_packages():
106     """Return package list"""
107     packages = get_subpackages(LIBNAME)
108     return packages
109 
110 
111 #==============================================================================
112 # Make Linux detect Spyder desktop file
113 #==============================================================================
114 class MyInstallData(install_data):
115     def run(self):
116         install_data.run(self)
117         if sys.platform.startswith('linux'):
118             try:
119                 subprocess.call(['update-desktop-database'])
120             except:
121                 print("ERROR: unable to update desktop database",
122                       file=sys.stderr)
123 CMDCLASS = {'install_data': MyInstallData}
124 
125 
126 #==============================================================================
127 # Main scripts
128 #==============================================================================
129 # NOTE: the '[...]_win_post_install.py' script is installed even on non-Windows
130 # platforms due to a bug in pip installation process
131 # See spyder-ide/spyder#1158.
132 SCRIPTS = ['%s_win_post_install.py' % NAME]
133 if PY3 and sys.platform.startswith('linux'):
134     SCRIPTS.append('spyder3')
135 else:
136     SCRIPTS.append('spyder')
137 
138 
139 #==============================================================================
140 # Files added to the package
141 #==============================================================================
142 EXTLIST = ['.pot', '.po', '.mo', '.svg', '.png', '.css', '.html', '.js',
143            '.ini', '.txt', '.qss', '.ttf', '.json', '.rst', '.bloom']
144 if os.name == 'nt':
145     SCRIPTS += ['spyder.bat']
146     EXTLIST += ['.ico']
147 
148 
149 #==============================================================================
150 # Use Readme for long description
151 #==============================================================================
152 with io.open('README.md', encoding='utf-8') as f:
153     LONG_DESCRIPTION = f.read()
154 
155 
156 #==============================================================================
157 # Setup arguments
158 #==============================================================================
159 setup_args = dict(
160     name=NAME,
161     version=__version__,
162     description='The Scientific Python Development Environment',
163     long_description=LONG_DESCRIPTION,
164     long_description_content_type='text/markdown',
165     download_url=__website_url__ + "#fh5co-download",
166     author="The Spyder Project Contributors",
167     author_email="spyderlib@googlegroups.com",
168     url=__website_url__,
169     license='MIT',
170     keywords='PyQt5 editor console widgets IDE science data analysis IPython',
171     platforms=["Windows", "Linux", "Mac OS-X"],
172     packages=get_packages(),
173     package_data={LIBNAME: get_package_data(LIBNAME, EXTLIST)},
174     scripts=[osp.join('scripts', fname) for fname in SCRIPTS],
175     data_files=get_data_files(),
176     classifiers=['License :: OSI Approved :: MIT License',
177                  'Operating System :: MacOS',
178                  'Operating System :: Microsoft :: Windows',
179                  'Operating System :: POSIX :: Linux',
180                  'Programming Language :: Python :: 2',
181                  'Programming Language :: Python :: 2.7',
182                  'Programming Language :: Python :: 3',
183                  'Programming Language :: Python :: 3.4',
184                  'Programming Language :: Python :: 3.5',
185                  'Programming Language :: Python :: 3.6',
186                  'Programming Language :: Python :: 3.7',
187                  'Development Status :: 5 - Production/Stable',
188                  'Intended Audience :: Education',
189                  'Intended Audience :: Science/Research',
190                  'Intended Audience :: Developers',
191                  'Topic :: Scientific/Engineering',
192                  'Topic :: Software Development :: Widget Sets'],
193     cmdclass=CMDCLASS)
194 
195 
196 #==============================================================================
197 # Setuptools deps
198 #==============================================================================
199 if any(arg == 'bdist_wheel' for arg in sys.argv):
200     import setuptools     # analysis:ignore
201 
202 install_requires = [
203     'applaunchservices>=0.1.7;platform_system=="Darwin"',
204     'atomicwrites>=1.2.0',
205     'chardet>=2.0.0',
206     'cloudpickle>=0.5.0',
207     'diff-match-patch>=20181111',
208     'intervaltree',
209     'ipython>=4.0',
210     # This is here until Jedi 0.15+ fixes completions for
211     # Numpy and Pandas
212     'jedi==0.15.2',
213     # Don't require keyring for Python 2 and Linux
214     # because it depends on system packages
215     'keyring;sys_platform!="linux2"',
216     'nbconvert>=4.0',
217     'numpydoc>=0.6.0',
218     # Required to get SSH connections to remote kernels
219     'paramiko>=2.4.0;platform_system=="Windows"',
220     'parso==0.5.2',
221     'pexpect>=4.4.0',
222     'pickleshare>=0.4',
223     'psutil>=5.3',
224     'pygments>=2.0',
225     'pylint>=0.25',
226     'pyqt5<5.13;python_version>="3"',
227     'pyqtwebengine<5.13;python_version>="3"',
228     'python-language-server[all]>=0.31.2,<0.32.0',
229     'pyxdg>=0.26;platform_system=="Linux"',
230     'pyzmq>=17',
231     'qdarkstyle>=2.8',
232     'qtawesome>=0.5.7',
233     'qtconsole>=4.6.0',
234     'qtpy>=1.5.0',
235     'sphinx>=0.6.6',
236     'spyder-kernels>=1.9.0,<1.10.0',
237     'watchdog',
238 ]
239 
240 extras_require = {
241     'test:python_version == "2.7"': ['mock'],
242     'test:platform_system == "Linux"': ['pytest-xvfb'],
243     'test:platform_system == "Windows"': ['pywin32'],
244     'test': [
245         'coverage<5.0',
246         'cython',
247         'flaky',
248         'matplotlib',
249         'mock',
250         'pandas',
251         'pillow',
252         'pytest<5.0',
253         'pytest-cov',
254         'pytest-faulthandler<2.0',
255         'pytest-lazy-fixture',
256         'pytest-mock',
257         'pytest-ordering',
258         'pytest-qt',
259         'pyyaml',
260         'scipy',
261         'sympy',
262     ],
263 }
264 
265 if 'setuptools' in sys.modules:
266     setup_args['install_requires'] = install_requires
267     setup_args['extras_require'] = extras_require
268 
269     setup_args['entry_points'] = {
270         'gui_scripts': [
271             '{} = spyder.app.start:main'.format(
272                 'spyder3' if PY3 else 'spyder')
273         ]
274     }
275 
276     setup_args.pop('scripts', None)
277 
278 
279 #==============================================================================
280 # Main setup
281 #==============================================================================
282 setup(**setup_args)
283
```
--- 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
@@ -130,20 +130,21 @@
 # platforms due to a bug in pip installation process
 # See spyder-ide/spyder#1158.
 SCRIPTS = ['%s_win_post_install.py' % NAME]
+
 if PY3 and sys.platform.startswith('linux'):
     SCRIPTS.append('spyder3')
 else:
     SCRIPTS.append('spyder')
 
+if os.name == 'nt':
+    SCRIPTS += ['spyder.bat']
 
 #==============================================================================
 # Files added to the package
 #==============================================================================
 EXTLIST = ['.pot', '.po', '.mo', '.svg', '.png', '.css', '.html', '.js',
-           '.ini', '.txt', '.qss', '.ttf', '.json', '.rst', '.bloom']
-if os.name == 'nt':
-    SCRIPTS += ['spyder.bat']
-    EXTLIST += ['.ico']
+           '.ini', '.txt', '.qss', '.ttf', '.json', '.rst', '.bloom',
+           '.ico', '.gif', '.mp3', '.ogg', '.sfd', '.bat', '.sh']
 
 
 #==============================================================================

{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -130,20 +130,21 @@\n # platforms due to a bug in pip installation process\n # See spyder-ide/spyder#1158.\n SCRIPTS = ['%s_win_post_install.py' % NAME]\n+\n if PY3 and sys.platform.startswith('linux'):\n     SCRIPTS.append('spyder3')\n else:\n     SCRIPTS.append('spyder')\n \n+if os.name == 'nt':\n+    SCRIPTS += ['spyder.bat']\n \n #==============================================================================\n # Files added to the package\n #==============================================================================\n EXTLIST = ['.pot', '.po', '.mo', '.svg', '.png', '.css', '.html', '.js',\n-           '.ini', '.txt', '.qss', '.ttf', '.json', '.rst', '.bloom']\n-if os.name == 'nt':\n-    SCRIPTS += ['spyder.bat']\n-    EXTLIST += ['.ico']\n+           '.ini', '.txt', '.qss', '.ttf', '.json', '.rst', '.bloom',\n+           '.ico', '.gif', '.mp3', '.ogg', '.sfd', '.bat', '.sh']\n \n \n #==============================================================================\n", "issue": "Activation of kernel env fails when using anaconda shortcut (FileNotFound error kernel start 4.1.0)\n<!--- **PLEASE READ:** When submitting here, please ensure you've completed the following checklist and checked the boxes to confirm. Issue reports without it may be closed. Thanks! --->\r\n## Problem Description\r\n\r\nSpyder4.1.0 IPython kernel startup error\r\nClose spyder and restart, the problem persists.\r\n### What steps reproduce the problem?\r\n\r\nAfter upgrading spyder4.0.1 to 4.1.0, IPython kernel startup error occurs when starting spyder.\r\nThe following command is used to upgrade in a virtual environment:\r\nconda install spyder=4.1.0\r\n```python-traceback\r\n\u542f\u52a8 IPython \u5185\u6838\u65f6\u53d1\u751f\u9519\u8bef\uff08An error occurred while starting the IPython kernel\uff09\r\n\u9519\u8bef\uff1a\uff08Error\uff09\r\nTraceback (most recent call last):\r\nFile \"C:\\Users\\Admin\\Anaconda3\\envs\\python37\\lib\\site\u2011packages\\spyder\\plugins\\ipythonconsole\\plugin.py\", line 1209, in create_kernel_manager_and_kernel_client\r\nkernel_manager.start_kernel(stderr=stderr_handle, **kwargs)\r\nFile \"C:\\Users\\Admin\\Anaconda3\\envs\\python37\\lib\\site\u2011packages\\jupyter_client\\manager.py\", line 259, in start_kernel\r\n**kw)\r\nFile \"C:\\Users\\Admin\\Anaconda3\\envs\\python37\\lib\\site\u2011packages\\jupyter_client\\manager.py\", line 204, in _launch_kernel\r\nreturn launch_kernel(kernel_cmd, **kw)\r\nFile \"C:\\Users\\Admin\\Anaconda3\\envs\\python37\\lib\\site\u2011packages\\jupyter_client\\launcher.py\", line 138, in launch_kernel\r\nproc = Popen(cmd, **kwargs)\r\nFile \"C:\\Users\\Admin\\Anaconda3\\envs\\python37\\lib\\subprocess.py\", line 800, in __init__\r\nrestore_signals, start_new_session)\r\nFile \"C:\\Users\\Admin\\Anaconda3\\envs\\python37\\lib\\subprocess.py\", line 1207, in _execute_child\r\nstartupinfo)\r\nFileNotFoundError: [WinError 2] \u7cfb\u7edf\u627e\u4e0d\u5230\u6307\u5b9a\u7684\u6587\u4ef6\uff08The system can not find the file specified\uff09\u3002\r\n```\r\n\r\n## Versions\r\n<!--- You can get this information from Help > About Spyder...\r\nor (if Spyder won't launch) the \"conda list\" command\r\nfrom the Anaconda Prompt/Terminal/command line. --->\r\n\r\n* Spyder version: 4.1.0\r\n* Python version: Python3.7.5\r\n* Qt version: 5.9.6\r\n* PyQt version: 5.9.2\r\n* Operating System name/version: win10\r\n\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\n#\n# Copyright \u00a9 Spyder Project Contributors\n# Licensed under the terms of the MIT License\n# (see spyder/__init__.py for details)\n\n\"\"\"\nSpyder\n======\n\nThe Scientific Python Development Environment\n\nSpyder is a powerful scientific environment written in Python, for Python,\nand designed by and for scientists, engineers and data analysts.\n\nIt features a unique combination of the advanced editing, analysis, debugging\nand profiling functionality of a comprehensive development tool with the data\nexploration, interactive execution, deep inspection and beautiful visualization\ncapabilities of a scientific package.\n\"\"\"\n\nfrom __future__ import print_function\n\nimport io\nimport os\nimport os.path as osp\nimport subprocess\nimport sys\nimport shutil\n\nfrom distutils.core import setup\nfrom distutils.command.install_data import install_data\n\n\n#==============================================================================\n# Check for Python 3\n#==============================================================================\nPY3 = sys.version_info[0] == 3\n\n\n#==============================================================================\n# Minimal Python version sanity check\n# Taken from the notebook setup.py -- Modified BSD License\n#==============================================================================\nv = sys.version_info\nif v[:2] < (2, 7) or (v[0] >= 3 and v[:2] < (3, 5)):\n    error = \"ERROR: Spyder requires Python version 2.7 or 3.5 and above.\"\n    print(error, file=sys.stderr)\n    sys.exit(1)\n\n\n#==============================================================================\n# Constants\n#==============================================================================\nNAME = 'spyder'\nLIBNAME = 'spyder'\nfrom spyder import __version__, __website_url__  #analysis:ignore\n\n\n#==============================================================================\n# Auxiliary functions\n#==============================================================================\ndef get_package_data(name, extlist):\n    \"\"\"Return data files for package *name* with extensions in *extlist*\"\"\"\n    flist = []\n    # Workaround to replace os.path.relpath (not available until Python 2.6):\n    offset = len(name)+len(os.pathsep)\n    for dirpath, _dirnames, filenames in os.walk(name):\n        if 'tests' not in dirpath:\n            for fname in filenames:\n                if (not fname.startswith('.') and\n                        osp.splitext(fname)[1] in extlist):\n                    flist.append(osp.join(dirpath, fname)[offset:])\n    return flist\n\n\ndef get_subpackages(name):\n    \"\"\"Return subpackages of package *name*\"\"\"\n    splist = []\n    for dirpath, _dirnames, _filenames in os.walk(name):\n        if 'tests' not in dirpath:\n            if osp.isfile(osp.join(dirpath, '__init__.py')):\n                splist.append(\".\".join(dirpath.split(os.sep)))\n    return splist\n\n\ndef get_data_files():\n    \"\"\"Return data_files in a platform dependent manner\"\"\"\n    if sys.platform.startswith('linux'):\n        if PY3:\n            data_files = [('share/applications', ['scripts/spyder3.desktop']),\n                          ('share/icons', ['img_src/spyder3.png']),\n                          ('share/metainfo', ['scripts/spyder3.appdata.xml'])]\n        else:\n            data_files = [('share/applications', ['scripts/spyder.desktop']),\n                          ('share/icons', ['img_src/spyder.png'])]\n    elif os.name == 'nt':\n        data_files = [('scripts', ['img_src/spyder.ico',\n                                   'img_src/spyder_reset.ico'])]\n    else:\n        data_files = []\n    return data_files\n\n\ndef get_packages():\n    \"\"\"Return package list\"\"\"\n    packages = get_subpackages(LIBNAME)\n    return packages\n\n\n#==============================================================================\n# Make Linux detect Spyder desktop file\n#==============================================================================\nclass MyInstallData(install_data):\n    def run(self):\n        install_data.run(self)\n        if sys.platform.startswith('linux'):\n            try:\n                subprocess.call(['update-desktop-database'])\n            except:\n                print(\"ERROR: unable to update desktop database\",\n                      file=sys.stderr)\nCMDCLASS = {'install_data': MyInstallData}\n\n\n#==============================================================================\n# Main scripts\n#==============================================================================\n# NOTE: the '[...]_win_post_install.py' script is installed even on non-Windows\n# platforms due to a bug in pip installation process\n# See spyder-ide/spyder#1158.\nSCRIPTS = ['%s_win_post_install.py' % NAME]\nif PY3 and sys.platform.startswith('linux'):\n    SCRIPTS.append('spyder3')\nelse:\n    SCRIPTS.append('spyder')\n\n\n#==============================================================================\n# Files added to the package\n#==============================================================================\nEXTLIST = ['.pot', '.po', '.mo', '.svg', '.png', '.css', '.html', '.js',\n           '.ini', '.txt', '.qss', '.ttf', '.json', '.rst', '.bloom']\nif os.name == 'nt':\n    SCRIPTS += ['spyder.bat']\n    EXTLIST += ['.ico']\n\n\n#==============================================================================\n# Use Readme for long description\n#==============================================================================\nwith io.open('README.md', encoding='utf-8') as f:\n    LONG_DESCRIPTION = f.read()\n\n\n#==============================================================================\n# Setup arguments\n#==============================================================================\nsetup_args = dict(\n    name=NAME,\n    version=__version__,\n    description='The Scientific Python Development Environment',\n    long_description=LONG_DESCRIPTION,\n    long_description_content_type='text/markdown',\n    download_url=__website_url__ + \"#fh5co-download\",\n    author=\"The Spyder Project Contributors\",\n    author_email=\"spyderlib@googlegroups.com\",\n    url=__website_url__,\n    license='MIT',\n    keywords='PyQt5 editor console widgets IDE science data analysis IPython',\n    platforms=[\"Windows\", \"Linux\", \"Mac OS-X\"],\n    packages=get_packages(),\n    package_data={LIBNAME: get_package_data(LIBNAME, EXTLIST)},\n    scripts=[osp.join('scripts', fname) for fname in SCRIPTS],\n    data_files=get_data_files(),\n    classifiers=['License :: OSI Approved :: MIT License',\n                 'Operating System :: MacOS',\n                 'Operating System :: Microsoft :: Windows',\n                 'Operating System :: POSIX :: Linux',\n                 'Programming Language :: Python :: 2',\n                 'Programming Language :: Python :: 2.7',\n                 'Programming Language :: Python :: 3',\n                 'Programming Language :: Python :: 3.4',\n                 'Programming Language :: Python :: 3.5',\n                 'Programming Language :: Python :: 3.6',\n                 'Programming Language :: Python :: 3.7',\n                 'Development Status :: 5 - Production/Stable',\n                 'Intended Audience :: Education',\n                 'Intended Audience :: Science/Research',\n                 'Intended Audience :: Developers',\n                 'Topic :: Scientific/Engineering',\n                 'Topic :: Software Development :: Widget Sets'],\n    cmdclass=CMDCLASS)\n\n\n#==============================================================================\n# Setuptools deps\n#==============================================================================\nif any(arg == 'bdist_wheel' for arg in sys.argv):\n    import setuptools     # analysis:ignore\n\ninstall_requires = [\n    'applaunchservices>=0.1.7;platform_system==\"Darwin\"',\n    'atomicwrites>=1.2.0',\n    'chardet>=2.0.0',\n    'cloudpickle>=0.5.0',\n    'diff-match-patch>=20181111',\n    'intervaltree',\n    'ipython>=4.0',\n    # This is here until Jedi 0.15+ fixes completions for\n    # Numpy and Pandas\n    'jedi==0.15.2',\n    # Don't require keyring for Python 2 and Linux\n    # because it depends on system packages\n    'keyring;sys_platform!=\"linux2\"',\n    'nbconvert>=4.0',\n    'numpydoc>=0.6.0',\n    # Required to get SSH connections to remote kernels\n    'paramiko>=2.4.0;platform_system==\"Windows\"',\n    'parso==0.5.2',\n    'pexpect>=4.4.0',\n    'pickleshare>=0.4',\n    'psutil>=5.3',\n    'pygments>=2.0',\n    'pylint>=0.25',\n    'pyqt5<5.13;python_version>=\"3\"',\n    'pyqtwebengine<5.13;python_version>=\"3\"',\n    'python-language-server[all]>=0.31.2,<0.32.0',\n    'pyxdg>=0.26;platform_system==\"Linux\"',\n    'pyzmq>=17',\n    'qdarkstyle>=2.8',\n    'qtawesome>=0.5.7',\n    'qtconsole>=4.6.0',\n    'qtpy>=1.5.0',\n    'sphinx>=0.6.6',\n    'spyder-kernels>=1.9.0,<1.10.0',\n    'watchdog',\n]\n\nextras_require = {\n    'test:python_version == \"2.7\"': ['mock'],\n    'test:platform_system == \"Linux\"': ['pytest-xvfb'],\n    'test:platform_system == \"Windows\"': ['pywin32'],\n    'test': [\n        'coverage<5.0',\n        'cython',\n        'flaky',\n        'matplotlib',\n        'mock',\n        'pandas',\n        'pillow',\n        'pytest<5.0',\n        'pytest-cov',\n        'pytest-faulthandler<2.0',\n        'pytest-lazy-fixture',\n        'pytest-mock',\n        'pytest-ordering',\n        'pytest-qt',\n        'pyyaml',\n        'scipy',\n        'sympy',\n    ],\n}\n\nif 'setuptools' in sys.modules:\n    setup_args['install_requires'] = install_requires\n    setup_args['extras_require'] = extras_require\n\n    setup_args['entry_points'] = {\n        'gui_scripts': [\n            '{} = spyder.app.start:main'.format(\n                'spyder3' if PY3 else 'spyder')\n        ]\n    }\n\n    setup_args.pop('scripts', None)\n\n\n#==============================================================================\n# Main setup\n#==============================================================================\nsetup(**setup_args)\n", "path": "setup.py"}], "after_files": [{"content": "# -*- coding: utf-8 -*-\n#\n# Copyright \u00a9 Spyder Project Contributors\n# Licensed under the terms of the MIT License\n# (see spyder/__init__.py for details)\n\n\"\"\"\nSpyder\n======\n\nThe Scientific Python Development Environment\n\nSpyder is a powerful scientific environment written in Python, for Python,\nand designed by and for scientists, engineers and data analysts.\n\nIt features a unique combination of the advanced editing, analysis, debugging\nand profiling functionality of a comprehensive development tool with the data\nexploration, interactive execution, deep inspection and beautiful visualization\ncapabilities of a scientific package.\n\"\"\"\n\nfrom __future__ import print_function\n\nimport io\nimport os\nimport os.path as osp\nimport subprocess\nimport sys\nimport shutil\n\nfrom distutils.core import setup\nfrom distutils.command.install_data import install_data\n\n\n#==============================================================================\n# Check for Python 3\n#==============================================================================\nPY3 = sys.version_info[0] == 3\n\n\n#==============================================================================\n# Minimal Python version sanity check\n# Taken from the notebook setup.py -- Modified BSD License\n#==============================================================================\nv = sys.version_info\nif v[:2] < (2, 7) or (v[0] >= 3 and v[:2] < (3, 5)):\n    error = \"ERROR: Spyder requires Python version 2.7 or 3.5 and above.\"\n    print(error, file=sys.stderr)\n    sys.exit(1)\n\n\n#==============================================================================\n# Constants\n#==============================================================================\nNAME = 'spyder'\nLIBNAME = 'spyder'\nfrom spyder import __version__, __website_url__  #analysis:ignore\n\n\n#==============================================================================\n# Auxiliary functions\n#==============================================================================\ndef get_package_data(name, extlist):\n    \"\"\"Return data files for package *name* with extensions in *extlist*\"\"\"\n    flist = []\n    # Workaround to replace os.path.relpath (not available until Python 2.6):\n    offset = len(name)+len(os.pathsep)\n    for dirpath, _dirnames, filenames in os.walk(name):\n        if 'tests' not in dirpath:\n            for fname in filenames:\n                if (not fname.startswith('.') and\n                        osp.splitext(fname)[1] in extlist):\n                    flist.append(osp.join(dirpath, fname)[offset:])\n    return flist\n\n\ndef get_subpackages(name):\n    \"\"\"Return subpackages of package *name*\"\"\"\n    splist = []\n    for dirpath, _dirnames, _filenames in os.walk(name):\n        if 'tests' not in dirpath:\n            if osp.isfile(osp.join(dirpath, '__init__.py')):\n                splist.append(\".\".join(dirpath.split(os.sep)))\n    return splist\n\n\ndef get_data_files():\n    \"\"\"Return data_files in a platform dependent manner\"\"\"\n    if sys.platform.startswith('linux'):\n        if PY3:\n            data_files = [('share/applications', ['scripts/spyder3.desktop']),\n                          ('share/icons', ['img_src/spyder3.png']),\n                          ('share/metainfo', ['scripts/spyder3.appdata.xml'])]\n        else:\n            data_files = [('share/applications', ['scripts/spyder.desktop']),\n                          ('share/icons', ['img_src/spyder.png'])]\n    elif os.name == 'nt':\n        data_files = [('scripts', ['img_src/spyder.ico',\n                                   'img_src/spyder_reset.ico'])]\n    else:\n        data_files = []\n    return data_files\n\n\ndef get_packages():\n    \"\"\"Return package list\"\"\"\n    packages = get_subpackages(LIBNAME)\n    return packages\n\n\n#==============================================================================\n# Make Linux detect Spyder desktop file\n#==============================================================================\nclass MyInstallData(install_data):\n    def run(self):\n        install_data.run(self)\n        if sys.platform.startswith('linux'):\n            try:\n                subprocess.call(['update-desktop-database'])\n            except:\n                print(\"ERROR: unable to update desktop database\",\n                      file=sys.stderr)\nCMDCLASS = {'install_data': MyInstallData}\n\n\n#==============================================================================\n# Main scripts\n#==============================================================================\n# NOTE: the '[...]_win_post_install.py' script is installed even on non-Windows\n# platforms due to a bug in pip installation process\n# See spyder-ide/spyder#1158.\nSCRIPTS = ['%s_win_post_install.py' % NAME]\n\nif PY3 and sys.platform.startswith('linux'):\n    SCRIPTS.append('spyder3')\nelse:\n    SCRIPTS.append('spyder')\n\nif os.name == 'nt':\n    SCRIPTS += ['spyder.bat']\n\n#==============================================================================\n# Files added to the package\n#==============================================================================\nEXTLIST = ['.pot', '.po', '.mo', '.svg', '.png', '.css', '.html', '.js',\n           '.ini', '.txt', '.qss', '.ttf', '.json', '.rst', '.bloom',\n           '.ico', '.gif', '.mp3', '.ogg', '.sfd', '.bat', '.sh']\n\n\n#==============================================================================\n# Use Readme for long description\n#==============================================================================\nwith io.open('README.md', encoding='utf-8') as f:\n    LONG_DESCRIPTION = f.read()\n\n\n#==============================================================================\n# Setup arguments\n#==============================================================================\nsetup_args = dict(\n    name=NAME,\n    version=__version__,\n    description='The Scientific Python Development Environment',\n    long_description=LONG_DESCRIPTION,\n    long_description_content_type='text/markdown',\n    download_url=__website_url__ + \"#fh5co-download\",\n    author=\"The Spyder Project Contributors\",\n    author_email=\"spyderlib@googlegroups.com\",\n    url=__website_url__,\n    license='MIT',\n    keywords='PyQt5 editor console widgets IDE science data analysis IPython',\n    platforms=[\"Windows\", \"Linux\", \"Mac OS-X\"],\n    packages=get_packages(),\n    package_data={LIBNAME: get_package_data(LIBNAME, EXTLIST)},\n    scripts=[osp.join('scripts', fname) for fname in SCRIPTS],\n    data_files=get_data_files(),\n    classifiers=['License :: OSI Approved :: MIT License',\n                 'Operating System :: MacOS',\n                 'Operating System :: Microsoft :: Windows',\n                 'Operating System :: POSIX :: Linux',\n                 'Programming Language :: Python :: 2',\n                 'Programming Language :: Python :: 2.7',\n                 'Programming Language :: Python :: 3',\n                 'Programming Language :: Python :: 3.4',\n                 'Programming Language :: Python :: 3.5',\n                 'Programming Language :: Python :: 3.6',\n                 'Programming Language :: Python :: 3.7',\n                 'Development Status :: 5 - Production/Stable',\n                 'Intended Audience :: Education',\n                 'Intended Audience :: Science/Research',\n                 'Intended Audience :: Developers',\n                 'Topic :: Scientific/Engineering',\n                 'Topic :: Software Development :: Widget Sets'],\n    cmdclass=CMDCLASS)\n\n\n#==============================================================================\n# Setuptools deps\n#==============================================================================\nif any(arg == 'bdist_wheel' for arg in sys.argv):\n    import setuptools     # analysis:ignore\n\ninstall_requires = [\n    'applaunchservices>=0.1.7;platform_system==\"Darwin\"',\n    'atomicwrites>=1.2.0',\n    'chardet>=2.0.0',\n    'cloudpickle>=0.5.0',\n    'diff-match-patch>=20181111',\n    'intervaltree',\n    'ipython>=4.0',\n    # This is here until Jedi 0.15+ fixes completions for\n    # Numpy and Pandas\n    'jedi==0.15.2',\n    # Don't require keyring for Python 2 and Linux\n    # because it depends on system packages\n    'keyring;sys_platform!=\"linux2\"',\n    'nbconvert>=4.0',\n    'numpydoc>=0.6.0',\n    # Required to get SSH connections to remote kernels\n    'paramiko>=2.4.0;platform_system==\"Windows\"',\n    'parso==0.5.2',\n    'pexpect>=4.4.0',\n    'pickleshare>=0.4',\n    'psutil>=5.3',\n    'pygments>=2.0',\n    'pylint>=0.25',\n    'pyqt5<5.13;python_version>=\"3\"',\n    'pyqtwebengine<5.13;python_version>=\"3\"',\n    'python-language-server[all]>=0.31.2,<0.32.0',\n    'pyxdg>=0.26;platform_system==\"Linux\"',\n    'pyzmq>=17',\n    'qdarkstyle>=2.8',\n    'qtawesome>=0.5.7',\n    'qtconsole>=4.6.0',\n    'qtpy>=1.5.0',\n    'sphinx>=0.6.6',\n    'spyder-kernels>=1.9.0,<1.10.0',\n    'watchdog',\n]\n\nextras_require = {\n    'test:python_version == \"2.7\"': ['mock'],\n    'test:platform_system == \"Linux\"': ['pytest-xvfb'],\n    'test:platform_system == \"Windows\"': ['pywin32'],\n    'test': [\n        'coverage<5.0',\n        'cython',\n        'flaky',\n        'matplotlib',\n        'mock',\n        'pandas',\n        'pillow',\n        'pytest<5.0',\n        'pytest-cov',\n        'pytest-faulthandler<2.0',\n        'pytest-lazy-fixture',\n        'pytest-mock',\n        'pytest-ordering',\n        'pytest-qt',\n        'pyyaml',\n        'scipy',\n        'sympy',\n    ],\n}\n\nif 'setuptools' in sys.modules:\n    setup_args['install_requires'] = install_requires\n    setup_args['extras_require'] = extras_require\n\n    setup_args['entry_points'] = {\n        'gui_scripts': [\n            '{} = spyder.app.start:main'.format(\n                'spyder3' if PY3 else 'spyder')\n        ]\n    }\n\n    setup_args.pop('scripts', None)\n\n\n#==============================================================================\n# Main setup\n#==============================================================================\nsetup(**setup_args)\n", "path": "setup.py"}]}