We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
spyder 3.3.3 icon theme Spyder 3 problem with PyQt 5.12
## Problem Description
After updating to Spyder 3.3.3 (on Linux, with Python 3.6.7 64-bit |  |  Qt 5.12.1 | PyQt5 5.12 ) spyder icon theme "Spyder 3" stopped working (because of coming with this version PyQt upgrade probably) . Only the "Spyder 2" icon theme is working.
Below the look of Spyder3 icon theme
![screenshot from 2019-02-11 10-36-08](https://user-images.githubusercontent.com/7980381/52555605-7e88c300-2dea-11e9-8236-f7ab0b4accd7.png)

After reverting to PyQt 5.9.2 the icon set Spyder3 is working again.


--- 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 os
25 import os.path as osp
26 import subprocess
27 import sys
28 import shutil
29 
30 from distutils.core import setup
31 from distutils.command.install_data import install_data
32 
33 
34 #==============================================================================
35 # Check for Python 3
36 #==============================================================================
37 PY3 = sys.version_info[0] == 3
38 
39 
40 #==============================================================================
41 # Minimal Python version sanity check
42 # Taken from the notebook setup.py -- Modified BSD License
43 #==============================================================================
44 v = sys.version_info
45 if v[:2] < (2, 7) or (v[0] >= 3 and v[:2] < (3, 4)):
46     error = "ERROR: Spyder requires Python version 2.7 or 3.4 and above."
47     print(error, file=sys.stderr)
48     sys.exit(1)
49 
50 
51 #==============================================================================
52 # Constants
53 #==============================================================================
54 NAME = 'spyder'
55 LIBNAME = 'spyder'
56 from spyder import __version__, __website_url__  #analysis:ignore
57 
58 
59 #==============================================================================
60 # Auxiliary functions
61 #==============================================================================
62 def get_package_data(name, extlist):
63     """Return data files for package *name* with extensions in *extlist*"""
64     flist = []
65     # Workaround to replace os.path.relpath (not available until Python 2.6):
66     offset = len(name)+len(os.pathsep)
67     for dirpath, _dirnames, filenames in os.walk(name):
68         for fname in filenames:
69             if not fname.startswith('.') and osp.splitext(fname)[1] in extlist:
70                 flist.append(osp.join(dirpath, fname)[offset:])
71     return flist
72 
73 
74 def get_subpackages(name):
75     """Return subpackages of package *name*"""
76     splist = []
77     for dirpath, _dirnames, _filenames in os.walk(name):
78         if osp.isfile(osp.join(dirpath, '__init__.py')):
79             splist.append(".".join(dirpath.split(os.sep)))
80     return splist
81 
82 
83 def get_data_files():
84     """Return data_files in a platform dependent manner"""
85     if sys.platform.startswith('linux'):
86         if PY3:
87             data_files = [('share/applications', ['scripts/spyder3.desktop']),
88                           ('share/icons', ['img_src/spyder3.png']),
89                           ('share/metainfo', ['scripts/spyder3.appdata.xml'])]
90         else:
91             data_files = [('share/applications', ['scripts/spyder.desktop']),
92                           ('share/icons', ['img_src/spyder.png'])]
93     elif os.name == 'nt':
94         data_files = [('scripts', ['img_src/spyder.ico',
95                                    'img_src/spyder_reset.ico'])]
96     else:
97         data_files = []
98     return data_files
99 
100 
101 def get_packages():
102     """Return package list"""
103     packages = (
104         get_subpackages(LIBNAME)
105         + get_subpackages('spyder_breakpoints')
106         + get_subpackages('spyder_profiler')
107         + get_subpackages('spyder_pylint')
108         + get_subpackages('spyder_io_dcm')
109         + get_subpackages('spyder_io_hdf5')
110         )
111     return packages
112 
113 
114 #==============================================================================
115 # Make Linux detect Spyder desktop file
116 #==============================================================================
117 class MyInstallData(install_data):
118     def run(self):
119         install_data.run(self)
120         if sys.platform.startswith('linux'):
121             try:
122                 subprocess.call(['update-desktop-database'])
123             except:
124                 print("ERROR: unable to update desktop database",
125                       file=sys.stderr)
126 CMDCLASS = {'install_data': MyInstallData}
127 
128 
129 #==============================================================================
130 # Main scripts
131 #==============================================================================
132 # NOTE: the '[...]_win_post_install.py' script is installed even on non-Windows
133 # platforms due to a bug in pip installation process (see Issue 1158)
134 SCRIPTS = ['%s_win_post_install.py' % NAME]
135 if PY3 and sys.platform.startswith('linux'):
136     SCRIPTS.append('spyder3')
137 else:
138     SCRIPTS.append('spyder')
139 
140 
141 #==============================================================================
142 # Files added to the package
143 #==============================================================================
144 EXTLIST = ['.mo', '.svg', '.png', '.css', '.html', '.js', '.chm', '.ini',
145            '.txt', '.rst', '.qss', '.ttf', '.json', '.c', '.cpp', '.java',
146            '.md', '.R', '.csv', '.pyx', '.ipynb', '.xml']
147 if os.name == 'nt':
148     SCRIPTS += ['spyder.bat']
149     EXTLIST += ['.ico']
150 
151 
152 #==============================================================================
153 # Setup arguments
154 #==============================================================================
155 setup_args = dict(
156     name=NAME,
157     version=__version__,
158     description='The Scientific Python Development Environment',
159     long_description=(
160 """Spyder is a powerful scientific environment written in Python, for Python,
161 and designed by and for scientists, engineers and data analysts.
162 It features a unique combination of the advanced editing, analysis, debugging
163 and profiling functionality of a comprehensive development tool with the data
164 exploration, interactive execution, deep inspection and beautiful visualization
165 capabilities of a scientific package.\n
166 Furthermore, Spyder offers built-in integration with many popular
167 scientific packages, including NumPy, SciPy, Pandas, IPython, QtConsole,
168 Matplotlib, SymPy, and more.\n
169 Beyond its many built-in features, Spyder's abilities can be extended even
170 further via first- and third-party plugins.\n
171 Spyder can also be used as a PyQt5 extension library, allowing you to build
172 upon its functionality and embed its components, such as the interactive
173 console or advanced editor, in your own software.
174 """),
175     download_url=__website_url__ + "#fh5co-download",
176     author="The Spyder Project Contributors",
177     author_email="spyderlib@googlegroups.com",
178     url=__website_url__,
179     license='MIT',
180     keywords='PyQt5 editor console widgets IDE science data analysis IPython',
181     platforms=["Windows", "Linux", "Mac OS-X"],
182     packages=get_packages(),
183     package_data={LIBNAME: get_package_data(LIBNAME, EXTLIST),
184                   'spyder_breakpoints': get_package_data('spyder_breakpoints',
185                                                          EXTLIST),
186                   'spyder_profiler': get_package_data('spyder_profiler',
187                                                       EXTLIST),
188                   'spyder_pylint': get_package_data('spyder_pylint',
189                                                     EXTLIST),
190                   'spyder_io_dcm': get_package_data('spyder_io_dcm',
191                                                     EXTLIST),
192                   'spyder_io_hdf5': get_package_data('spyder_io_hdf5',
193                                                      EXTLIST),
194                   },
195     scripts=[osp.join('scripts', fname) for fname in SCRIPTS],
196     data_files=get_data_files(),
197     classifiers=['License :: OSI Approved :: MIT License',
198                  'Operating System :: MacOS',
199                  'Operating System :: Microsoft :: Windows',
200                  'Operating System :: POSIX :: Linux',
201                  'Programming Language :: Python :: 2',
202                  'Programming Language :: Python :: 2.7',
203                  'Programming Language :: Python :: 3',
204                  'Programming Language :: Python :: 3.4',
205                  'Programming Language :: Python :: 3.5',
206                  'Programming Language :: Python :: 3.6',
207                  'Programming Language :: Python :: 3.7',
208                  'Development Status :: 5 - Production/Stable',
209                  'Intended Audience :: Education',
210                  'Intended Audience :: Science/Research',
211                  'Intended Audience :: Developers',
212                  'Topic :: Scientific/Engineering',
213                  'Topic :: Software Development :: Widget Sets'],
214     cmdclass=CMDCLASS)
215 
216 
217 #==============================================================================
218 # Setuptools deps
219 #==============================================================================
220 if any(arg == 'bdist_wheel' for arg in sys.argv):
221     import setuptools     # analysis:ignore
222 
223 install_requires = [
224     'cloudpickle',
225     'rope>=0.10.5',
226     'jedi>=0.9.0',
227     'pyflakes',
228     'pygments>=2.0',
229     'qtconsole>=4.2.0',
230     'nbconvert',
231     'sphinx',
232     'pycodestyle',
233     'pylint',
234     'psutil',
235     'qtawesome>=0.4.1',
236     'qtpy>=1.5.0',
237     'pickleshare',
238     'pyzmq',
239     'chardet>=2.0.0',
240     'numpydoc',
241     'spyder-kernels>=0.4.2,<1.0',
242     # Don't require keyring for Python 2 and Linux
243     # because it depends on system packages
244     'keyring;sys_platform!="linux2"',
245     # Packages for pyqt5 are only available in
246     # Python 3
247     'pyqt5<5.13;python_version>="3"',
248     # pyqt5 5.12 split WebEngine into the
249     # pyqtwebengine module
250     'pyqtwebengine<5.13'
251 ]
252 
253 extras_require = {
254     'test:python_version == "2.7"': ['mock'],
255     'test': ['pytest<4.1',
256              'pytest-qt',
257              'pytest-mock',
258              'pytest-cov',
259              'pytest-xvfb',
260              'mock',
261              'flaky',
262              'pandas',
263              'scipy',
264              'sympy',
265              'pillow',
266              'matplotlib',
267              'cython'],
268 }
269 
270 if 'setuptools' in sys.modules:
271     setup_args['install_requires'] = install_requires
272     setup_args['extras_require'] = extras_require
273 
274     setup_args['entry_points'] = {
275         'gui_scripts': [
276             '{} = spyder.app.start:main'.format(
277                 'spyder3' if PY3 else 'spyder')
278         ]
279     }
280 
281     setup_args.pop('scripts', None)
282 
283 
284 #==============================================================================
285 # Main setup
286 #==============================================================================
287 setup(**setup_args)
288
```
--- 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
@@ -232,7 +232,7 @@
     'pycodestyle',
     'pylint',
     'psutil',
-    'qtawesome>=0.4.1',
+    'qtawesome>=0.5.7',
     'qtpy>=1.5.0',
     'pickleshare',
     'pyzmq',

{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -232,7 +232,7 @@\n     'pycodestyle',\n     'pylint',\n     'psutil',\n-    'qtawesome>=0.4.1',\n+    'qtawesome>=0.5.7',\n     'qtpy>=1.5.0',\n     'pickleshare',\n     'pyzmq',\n", "issue": "spyder 3.3.3 icon theme Spyder 3 problem with PyQt 5.12\n## Problem Description\r\nAfter updating to Spyder 3.3.3 (on Linux, with Python 3.6.7 64-bit |  |  Qt 5.12.1 | PyQt5 5.12 ) spyder icon theme \"Spyder 3\" stopped working (because of coming with this version PyQt upgrade probably) . Only the \"Spyder 2\" icon theme is working.\r\nBelow the look of Spyder3 icon theme\r\n![screenshot from 2019-02-11 10-36-08](https://user-images.githubusercontent.com/7980381/52555605-7e88c300-2dea-11e9-8236-f7ab0b4accd7.png)\r\n\r\nAfter reverting to PyQt 5.9.2 the icon set Spyder3 is working again.\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 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, 4)):\n    error = \"ERROR: Spyder requires Python version 2.7 or 3.4 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        for fname in filenames:\n            if not fname.startswith('.') and 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 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 = (\n        get_subpackages(LIBNAME)\n        + get_subpackages('spyder_breakpoints')\n        + get_subpackages('spyder_profiler')\n        + get_subpackages('spyder_pylint')\n        + get_subpackages('spyder_io_dcm')\n        + get_subpackages('spyder_io_hdf5')\n        )\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 (see Issue 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 = ['.mo', '.svg', '.png', '.css', '.html', '.js', '.chm', '.ini',\n           '.txt', '.rst', '.qss', '.ttf', '.json', '.c', '.cpp', '.java',\n           '.md', '.R', '.csv', '.pyx', '.ipynb', '.xml']\nif os.name == 'nt':\n    SCRIPTS += ['spyder.bat']\n    EXTLIST += ['.ico']\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=(\n\"\"\"Spyder is a powerful scientific environment written in Python, for Python,\nand designed by and for scientists, engineers and data analysts.\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\nFurthermore, Spyder offers built-in integration with many popular\nscientific packages, including NumPy, SciPy, Pandas, IPython, QtConsole,\nMatplotlib, SymPy, and more.\\n\nBeyond its many built-in features, Spyder's abilities can be extended even\nfurther via first- and third-party plugins.\\n\nSpyder can also be used as a PyQt5 extension library, allowing you to build\nupon its functionality and embed its components, such as the interactive\nconsole or advanced editor, in your own software.\n\"\"\"),\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                  'spyder_breakpoints': get_package_data('spyder_breakpoints',\n                                                         EXTLIST),\n                  'spyder_profiler': get_package_data('spyder_profiler',\n                                                      EXTLIST),\n                  'spyder_pylint': get_package_data('spyder_pylint',\n                                                    EXTLIST),\n                  'spyder_io_dcm': get_package_data('spyder_io_dcm',\n                                                    EXTLIST),\n                  'spyder_io_hdf5': get_package_data('spyder_io_hdf5',\n                                                     EXTLIST),\n                  },\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    'cloudpickle',\n    'rope>=0.10.5',\n    'jedi>=0.9.0',\n    'pyflakes',\n    'pygments>=2.0',\n    'qtconsole>=4.2.0',\n    'nbconvert',\n    'sphinx',\n    'pycodestyle',\n    'pylint',\n    'psutil',\n    'qtawesome>=0.4.1',\n    'qtpy>=1.5.0',\n    'pickleshare',\n    'pyzmq',\n    'chardet>=2.0.0',\n    'numpydoc',\n    'spyder-kernels>=0.4.2,<1.0',\n    # Don't require keyring for Python 2 and Linux\n    # because it depends on system packages\n    'keyring;sys_platform!=\"linux2\"',\n    # Packages for pyqt5 are only available in\n    # Python 3\n    'pyqt5<5.13;python_version>=\"3\"',\n    # pyqt5 5.12 split WebEngine into the\n    # pyqtwebengine module\n    'pyqtwebengine<5.13'\n]\n\nextras_require = {\n    'test:python_version == \"2.7\"': ['mock'],\n    'test': ['pytest<4.1',\n             'pytest-qt',\n             'pytest-mock',\n             'pytest-cov',\n             'pytest-xvfb',\n             'mock',\n             'flaky',\n             'pandas',\n             'scipy',\n             'sympy',\n             'pillow',\n             'matplotlib',\n             'cython'],\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 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, 4)):\n    error = \"ERROR: Spyder requires Python version 2.7 or 3.4 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        for fname in filenames:\n            if not fname.startswith('.') and 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 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 = (\n        get_subpackages(LIBNAME)\n        + get_subpackages('spyder_breakpoints')\n        + get_subpackages('spyder_profiler')\n        + get_subpackages('spyder_pylint')\n        + get_subpackages('spyder_io_dcm')\n        + get_subpackages('spyder_io_hdf5')\n        )\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 (see Issue 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 = ['.mo', '.svg', '.png', '.css', '.html', '.js', '.chm', '.ini',\n           '.txt', '.rst', '.qss', '.ttf', '.json', '.c', '.cpp', '.java',\n           '.md', '.R', '.csv', '.pyx', '.ipynb', '.xml']\nif os.name == 'nt':\n    SCRIPTS += ['spyder.bat']\n    EXTLIST += ['.ico']\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=(\n\"\"\"Spyder is a powerful scientific environment written in Python, for Python,\nand designed by and for scientists, engineers and data analysts.\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\nFurthermore, Spyder offers built-in integration with many popular\nscientific packages, including NumPy, SciPy, Pandas, IPython, QtConsole,\nMatplotlib, SymPy, and more.\\n\nBeyond its many built-in features, Spyder's abilities can be extended even\nfurther via first- and third-party plugins.\\n\nSpyder can also be used as a PyQt5 extension library, allowing you to build\nupon its functionality and embed its components, such as the interactive\nconsole or advanced editor, in your own software.\n\"\"\"),\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                  'spyder_breakpoints': get_package_data('spyder_breakpoints',\n                                                         EXTLIST),\n                  'spyder_profiler': get_package_data('spyder_profiler',\n                                                      EXTLIST),\n                  'spyder_pylint': get_package_data('spyder_pylint',\n                                                    EXTLIST),\n                  'spyder_io_dcm': get_package_data('spyder_io_dcm',\n                                                    EXTLIST),\n                  'spyder_io_hdf5': get_package_data('spyder_io_hdf5',\n                                                     EXTLIST),\n                  },\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    'cloudpickle',\n    'rope>=0.10.5',\n    'jedi>=0.9.0',\n    'pyflakes',\n    'pygments>=2.0',\n    'qtconsole>=4.2.0',\n    'nbconvert',\n    'sphinx',\n    'pycodestyle',\n    'pylint',\n    'psutil',\n    'qtawesome>=0.5.7',\n    'qtpy>=1.5.0',\n    'pickleshare',\n    'pyzmq',\n    'chardet>=2.0.0',\n    'numpydoc',\n    'spyder-kernels>=0.4.2,<1.0',\n    # Don't require keyring for Python 2 and Linux\n    # because it depends on system packages\n    'keyring;sys_platform!=\"linux2\"',\n    # Packages for pyqt5 are only available in\n    # Python 3\n    'pyqt5<5.13;python_version>=\"3\"',\n    # pyqt5 5.12 split WebEngine into the\n    # pyqtwebengine module\n    'pyqtwebengine<5.13'\n]\n\nextras_require = {\n    'test:python_version == \"2.7\"': ['mock'],\n    'test': ['pytest<4.1',\n             'pytest-qt',\n             'pytest-mock',\n             'pytest-cov',\n             'pytest-xvfb',\n             'mock',\n             'flaky',\n             'pandas',\n             'scipy',\n             'sympy',\n             'pillow',\n             'matplotlib',\n             'cython'],\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"}]}